Linux PATH 环境变量

显示路径

echo $PATH

修改:

在 ~/.profile  中添加

export PATH=$PATH:/path/to/dir

或者做链接:

cd /usr/bin
sudo ln -s /path/to/binary binary-name

或者在~/.bashrc 中添加

export PATH=/path/to/dir:$PATH

全局中修改

/etc/profile

/etc/bashrc

原文地址:https://www.cnblogs.com/iowl/p/4050039.html