.bash_profile和.bashrc的区别,ubuntu下为.profile,没有.bash_profile

.bash_profile 开机自动加载,比如java的环境变量放在里面

.bashrc打开shell或终端就会加载该文件,比如起的别名或快捷方式放里面。alias设置就在其中。

还有一个.profile设置全局变量。

以上设置完之后,均可使用source命令立即生效:

source .bash_profile 

source .bashrc

原文地址:https://www.cnblogs.com/everest33Tong/p/5768480.html