|
|
发表于 2005-1-11 21:43:22
|
显示全部楼层
当存在~/.bashrc和~/.bash_profile时,它们总比/etc/bashrc和/etc/profile优先,
如果要/etc/bashrc或/etc/profile生效的话,只要在~/.bashrc里写上:
if [ -f "/etc/bashrc" ] ; then
source /etc/bashrc
fi
在~/.bash_profile里写上:
if [ -f "$HOME/.bashrc" ] ; then
source $HOME/.bashrc
fi
就行了。不会出现/etc/bashrc写了白写的情况。 |
|