/etc/profile和~/.bash_profile的区别

    /etc/profile是全局的,是私有的

/etc/profile用于整个系统所有用户, ~/.bash_profile, ~/.profile和~/.bashrc 用于各个用户,这里的"~"符号就是各当前用户的$HOME
~/.bash_profile 和 ~/.profile 只在登陆时读取一次。
~/.bashrc 每次都读取
~/.bash_profile 和 ~/.profile 的区别在于,bash 只读取~/.bash_profile;而对于 ~/.profile 来说,不光bash, 其他shell 也读 ~/.profile
posted @ 2016-03-11 10:22  lianghe  阅读(1819)  评论(0编辑  收藏  举报