最佳答案:加载顺序/etc/profile -> ~/.bash_profile -> base ~/.bashrc -> /etc/bashrc -> /etc/profile.d/s
加载顺序
/etc/profile -> ~/.bash_profile -> base ~/.bashrc -> /etc/bashrc -> /etc/profile.d/sh -> /etc/sysconfig/il8n
当用户登录进来,先加载/etc/profile ,加载完执行/etc/profile.d/.sh脚本,然后才运行 HOME/.bashrc,最后查找 /etc/bashrc
所有的脚本发现了就执行。