【Linux】profile与bashrc
1、单个用户的启动配置文件
~/.profile
~/.bashrc
2、全部用户的启动配置文件
/etc/profile
/etc/bash.bashrc
- bashrc是在系统启动后就会自动运行。
- profile是在用户登录后才会运行。
- 进行设置后,可运用source bashrc命令更新bashrc,也可运用source profile命令更新profile。
PS:通常我们修改bashrc,有些linux的发行版本不一定有profile这个文件,本文用的系统是Ubuntu 15.10 - /etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承/etc/profile中的变量,他们是"父子"关系。

浙公网安备 33010602011771号