Ubuntu environment variable configuration file and ubuntu environment variable
Ubuntu usually uses the following configuration files:
/Etc/environment,/etc/profile,/etc/bash. bashrc ,~ /. Profile ,~ /. Bashrc
Differences between them:
①/Etc/environment
This file is the first configuration file read during Ubuntu login, and environment variables are set for all processes.
②/Etc/profile
The second file read when this file is used to configure the environment variables of all users in the system
③/Etc/bash. bashrc
All initialization files of a shell (User Interface)
④ ~ /. Profile
Configure the personal work environment of the currently logged-on user
⑤ ~ /. Bashrc
The initialization file of the current user each time the shell is opened
Execution sequence:
/Etc/environment -->/etc/profile --> ~ /. Profile -->/etc/bash. bashrc --> ~ /. Bashrc
Instructions to make environment variables take effect:
Source/xxx