首页 > 技术文章 > bashrc的加载

westfly 2014-06-17 09:53 原文

无意中将home下的所有文件都删除了,一些配置文件都丢了。

重新登陆后,发现无法加载bashrc。

查找后,发现问题不在于bashrc,而在与.bash_profile丢失

login shell mode 只会读取 ~/.bash_profile , ~/.bash_login , ~/.profile 里面其中一个而已。

将其他系统上的.bash_profile 拷贝来即可,或者

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

bingo

 

推荐阅读