/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
/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
本文标题:shell中配置文件读取顺序
本文链接:https://www.haomeiwen.com/subject/rouzgctx.html
网友评论