輸出PATH
echo $PATH
臨時設置
export PATH=$PATH:/place/with/the/file
修改到系統path
將export PATH=$PATH:/place/with/the/file
放到/etc/profile
文件的最後
針對某個用戶的path
也是修改文件: ~/.profile
如果shell是bash, 還可以修改~/.bashrc
~/.bash_profile
參考鏈接
- https://opensource.com/article/17/6/set-path-linux
- https://www.fujieace.com/linux/path-2.html