在CentOS
中设置环境变量
PATH=$PATH:/home/new/bin
echo $PATH
vim ~/.bash_profile
最后加
PATH=$PATH:$HOME/bin:/home/new/bin
生效
source ~/.bash_profile
/etc/profile
vim /etc/profile
最后加
PATH=$PATH:/home/new/bin
export PATH
立即生效
source ~/.bash_profile
/etc/profile.d/
【推荐】vim /etc/profile.d/new.sh
添加
PATH=$PATH:/home/new/bin
export PATH
立即生效:
source ~/.bash_profile
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。