您的位置:首页 > 运维架构 > Shell

bashrc和profile的区别

2016-06-13 10:22 369 查看
/etc/profile是全局的,是私有的

<span style="background-color: rgb(255, 255, 255);"><span style="font-size:18px;">/etc/profile用于整个系统所有用户, ~/.bash_profile, ~/.profile和~/.bashrc 用于各个用户,这里的"~"符号就是各当前用户的$HOME
~/.bash_profile 和 ~/.profile 只在登陆时读取一次。
~/.bashrc 每次都读取

~/.bash_profile 和 ~/.profile 的区别在于,bash 只读取~/.bash_profile;而对于 ~/.profile 来说,不光bash, 其他shell 也读 ~/.profile </span></span>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: