Linux添加PATH

 上述方法的PATH 在终端关闭 后就会消失。所以还是建议通过编辑/etc/profile来改PATH,也可以改家目录下的.bashrc(即:~/.bashrc)。

第二种方法:
# vim /etc/profile
在文档最后,添加:
export PATH="/opt/STM/STLinux-2.3/devkit/sh4/bin:$PATH"
保存,退出,然后运行:
#source /etc/profile

不报错则成功。

原文地址:https://www.cnblogs.com/tarzen213/p/13163607.html