最近给人装Linux Mint,发现source /etc/profile.d下的文件不正常,即我安装了intel的编译器,但是在这个位置建立文件source PATH/iccvars.sh intel64后,终端中环境变量没有更新(重启后)。
在其他发行版,如Archlinux中没有这个问题。
现在,想请大家帮助。应该怎么设置才正确。
【求助】: source /etc/profile.d下的文件不正常
-
- 帖子: 18
- 注册时间: 2007-06-04 18:07
-
- 帖子: 66
- 注册时间: 2011-01-01 8:14
Re: 【求助】: source /etc/profile.d下的文件不正常
你要在 ~/.bashrc 或者 /etc/bash.bashrc 中加入
[ ] 里的内容,请查看 man test。
代码: 全选
if [ -f <FILE_LOCATION> ]; then
source <FILE_LOCATION>
fi
Blog <http://ffb-all.com/>
Linux User #529415 with Linux Counter <http://counter.li.org/>
PGP keyID F73D6274 hkp://keyserver.ubuntu.com
Linux User #529415 with Linux Counter <http://counter.li.org/>
PGP keyID F73D6274 hkp://keyserver.ubuntu.com