Ubuntu 环境变量加载顺序

# 系统级
/etc/profile
  /etc/bash.bashrc
/etc/environment

# 用户级
~/.profile
  ~/.bashrc
~/.bash_profile
~./bash_login
~/.bash_logout
~/.pam_environment
 # 设定顺序:
/etc/profile -> (~/.bash_profile | ~/.bash_login | ~/.profile) -> ~/.bashrc-> /etc/bashrc -> ~/.bash_logout 
# 修改变量后要加:(xxxx为设定的配置文件)
source xxxx

你可能感兴趣的:(Ubuntu 环境变量加载顺序)