1、用户级别环境变量定义文件(仅对当前用户生效)
~/.bashrc
~/.profile(部分系统为:~/.bash_profile)
2、系统级别环境变量定义文件(对所有用户生效)
/etc/environment
/etc/bashrc(或者/etc/bash.bashrc)
/etc/profile(或者/etc/bash_profile)
/etc/profile.d/xxx.sh
3、终端一次性环境变量配置(仅对当前终端生效)
export PATH=xxxxxx/bin:PATH 或者 export PATH=PATH:xxxxxx/bin