深度Linux /etc/profile 环境变量生效问题

/etc/profile 环境变量生效问题

设置了环境变量后 ,使用source /etc/profile生效后,每次关闭终端后,都需要重新输入source /etc/profile命令使环境变量生效,有这么坑的?

这个锅深度不背。而且你也不应该去动/etc/下的配置

修改~/.bashrc

cd /etc
vim ~/.bashrc
export PATH=$PATH:/home/landv/go/bin
source ~/.bashrc
原文地址:https://www.cnblogs.com/landv/p/10867433.html