Ubuntu20.04中为PATH环境变量添加一个新路径
1.查看原来的path环境变量的内容
echo $PATH
2.将路径 /home/sgj/.local/bin添加到path环境变量中
# 打开/etc/profile问价
sudo /etc/profile
3.在最后一行输入以下内容
export PATH=/home/sgj/.local/bin:$PATH
4.令/etc/profile文件中的新内容立即生效,无需重启
source /etc/profile
1.查看原来的path环境变量的内容
echo $PATH
2.将路径 /home/sgj/.local/bin添加到path环境变量中
# 打开/etc/profile问价
sudo /etc/profile
3.在最后一行输入以下内容
export PATH=/home/sgj/.local/bin:$PATH
4.令/etc/profile文件中的新内容立即生效,无需重启
source /etc/profile