linux中的~/.bashrc和/etc/profile

我以前在~/.bashrc中写了个PS1变量,有用,后来不知怎么的开机时不运行我的设置,我用命令“source ~/.bashrc”时能运行;
我在/etc/profile中设置PS1变量,也是开机不能执行,用source就可以了,而重新开机后有这样。
一开始没加,现在我加上去有试了一遍,还是没用

你的 .bash_profile 有没有这些

# source the system wide bashrc if it exists
if [ -e /etc/bash.bashrc ] ; then
source /etc/bash.bashrc
fi

# source the users bashrc if it exists
if [ -e "${HOME}/.bashrc" ] ; then
source "${HOME}/.bashrc"
fi

没有加入去就OK , 呵呵
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-09-28
加上了export 了吧?

参考资料:

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网