转自:http://blog.youkuaiyun.com/xdonx/article/details/8312938
当你的home下面有.bash_profile或者.bash_login的时候,会忽略调.profile.
稍微调查了一下,做个笔记
主要有一下几种方式
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
~/.bashrc
~/.bash_logout
/etc/profile
登录的时候读入,默认的设定文件.
~/.bash_profile
登录之后在/etc/profile载入之后载入,十分重要的配置文件
~/.bash_login
登录之后如果~/.bash_profile不存在的话,载入这个文件
~/.profile
登录之后~/.bash_login不存在的话,才载入这个文件
~/.bashrc
bash shell打开的时候载入
etc下的配置是针对系统,~下的主要是针对用户
本文介绍了 Linux 下 bash shell 的启动过程及其配置文件的加载顺序。详细解释了 /etc/profile、~/.bash_profile、~/.bash_login、~/.profile 和 ~/.bashrc 等文件的作用与区别。
1268

被折叠的 条评论
为什么被折叠?



