格式:export PATH=$PATH:/xxx/xxx
对所有用户生效:
/etc/environment
/etc/bash_profile
/etc/profile
/etc/bashrc
对当前用户生效:
~/.bash_profile
~/.profile
~/.bashrc
临时变量:
export PATH=$PATH:/xxx/xxx
详情参考:https://www.cnblogs.com/youyoui/p/10680329.html
原文:https://www.cnblogs.com/bigllxx/p/15209970.html