shell 环境初始化顺序

登陆shell 的执行顺序

/etc/profile
/etc/profile.d/file
/etc/bashrc
.bashrc
.bash_profile

非登录shell 的执行顺序, 例如:su - #切换用户

/etc/profile
/etc/profile.d/file
/etc/bashrc
原文地址:https://www.cnblogs.com/brookin/p/4825892.html