Source / etc / profile is successful under linux, reopen the user, does not take effect

When developing under Linux, we often install a lot of environments. Because there are many environments, we need to configure it as a global command, so that it is easy to operate. When configured as a global command, there is a way that is more commonly used:

 

 vim /etc/profile  增加配置信息,然后source /etc/profile是之生效。的确当前终端环境下的确是生效了,但是打开新的终端会发现,怎么没有生效?是我配置没成功吗?不对呀,之前明明可以的。

这个时候,你只需要执行下面操作即可:

     vim ~/.bashrc 

     然后最后一行添加 source /etc/profile

 

Published 42 original articles · praised 11 · 20,000+ views

Guess you like

Origin blog.csdn.net/QWERTY55555/article/details/105435868