美文网首页
shell中配置文件读取顺序

shell中配置文件读取顺序

作者: 蓝色科学史 | 来源:发表于2019-12-12 09:45 被阅读0次
/etc/profile→ (~/.bash_profile | ~/.bash_login | ~/.profile)→~/.bashrc →/etc/bashrc → ~/.bash_logout

在.bash_profile中:

if [ -f ~/.bashrc ] ; then
        source .bashrc
fi 

在.bashrc中:

if [ -f /etc/bashrc ] ; then
        source /etc/bashrc
fi 

转载:https://www.jianshu.com/p/35ad1b375e50

相关文章

网友评论

      本文标题:shell中配置文件读取顺序

      本文链接:https://www.haomeiwen.com/subject/rouzgctx.html