编程知识 cdmana.com

Linux configuration file

Linux The configuration file

/etc/profile and ~/.bash_profile

/etc/profile

Set the environment information and startup program for each user of the system , When the user logs in for the first time , The document is executed , Its configuration Valid for all logged in users . When modified , Restart or use the command source /etc/profile Will take effect .

 source /etc/profile 

~/.bash_profile

Set up exclusive environment information and startup program for the current user , The file executes once when the user logs in . By default , It is used to set environment variables , And execute the of the current user .bashrc file . The idea is similar to /etc/profile, It's just Valid only for the current user , You need to restart or use the command source ~/.bash_profile To take effect .

 source ~/.bash_profile

版权声明
本文为[gugugutime]所创,转载请带上原文链接,感谢
https://cdmana.com/2022/134/202205141324555676.html

Scroll to Top