【发布时间】:2011-04-06 08:41:06
【问题描述】:
我有windows box,也有linux box,我有我的帐户/home/my_username。每次连接到 linux 时,我都在 windows (cygwin ssh.exe) 中使用 ssh 客户端。但是每次登录后我都会运行一些脚本来设置一些环境变量。所以问题是我可以为我的用户(不改变其他人)设置环境变量以不运行每次脚本吗?
【问题讨论】:
标签: linux environment-variables
我有windows box,也有linux box,我有我的帐户/home/my_username。每次连接到 linux 时,我都在 windows (cygwin ssh.exe) 中使用 ssh 客户端。但是每次登录后我都会运行一些脚本来设置一些环境变量。所以问题是我可以为我的用户(不改变其他人)设置环境变量以不运行每次脚本吗?
【问题讨论】:
标签: linux environment-variables
通常你在你的 shell 中设置它.. 取决于你有什么:bash, sh, ... 例如在 /home/user/.bashrc 中添加你的东西,它将在登录后执行
【讨论】:
假设linux shell是bash,请参考http://www.gnu.org/software/bash/manual/bashref.html#Bash-Startup-Files。
对于其他 shell,文件会有所不同。手册页还应该告诉您需要修改哪个文件。
男人
【讨论】: