This article is my previous collation, this upload. Because just contact with Linux, has been on the inside of the variable set is confusing, so check the data to organize a bit, so that later query.
The Shell environment relies on settings for multiple files. Users do not need to manually set the various environment variables after each login, through the environment settings file, the user's work environment settings can be automatically logged in the system to complete. There are two types of environment settings files, one is the system environment settings file and the other is the personal environment settings file.
1) User working environment settings file in the system
Login environment settings File:/etc/profile
Non-logon environment settings file:/ETC/BASHRC
2) User-set environment settings file
Login environment settings file: $HOME/. Bash_profile
Non-logon environment settings file: $HOME/.BASHRC
Note: The profile is read only under certain circumstances, specifically when the user logs on. When shipped
After a shell script, you do not need to read the profile again.
The user environment file settings in the system are in effect for all users, and the environment settings files set by the user are
The body is in effect. Users can modify their user environment settings file to overwrite global settings in the System environment settings file.
For example:
1) The user can store the custom environment variables in the $home/. In Bash_profile;
2) The user can store the custom aliases in the $HOME/.BASHRC so that each login and call the child shell
is effective.
environment variable configuration file in Linux