/etc/profile. /ETC/BASHRC is the system Global environment variable setting
~/.PROFILE,~/.BASHRC private environment variable settings under the User home folder
When you get a shell process when you log in to the system. It has three steps to read the environment configuration file
1 first read the Global environment variable profile/etc/profile, and then read the additional set of documents according to its contents, such as
/ETC/PROFILE.D and/ETC/INPUTRC
2 then according to the different user account, go to their home folder read ~/.bash_profile, assuming this can not read the ~/.bash_login. It's not going to read.
~/.profile. These three document settings are basically the same. Read has a priority relationship
3 then read ~/.BASHRC on the user account
As for the difference between ~/.profile and ~/.BASHRC
are individually customizable
~/.profile can set the user's proprietary path, environment variables, etc., it can only log in when the time to run
~/.BASHRC is also a user-specific set-up document. Ability to set the path, command alias, each time the shell script run will use it once
Profile and BASHRC