bash环境变量读取顺序

bash环境变量读取顺序:

交互式登录的用户:
/etc/profile --> /etc/profile.d/*.sh --> ~/.bash_profile --> ~/.bashrc --> /etc/bashrc


非交互式登录的用户:
 ~/.bash_profile --> ~/.bashrc --> /etc/bashrc --> /etc/profile.d/*.sh

 

原文地址:https://www.cnblogs.com/xiluhua/p/5450575.html