All Users:
/etc/profile
This file sets the environment information for each user for the system, which is executed when the user logs on for the first time.
and collect the shell settings from the configuration file of the /etc/profile.d directory.
/ETC/BASHRC
Execute this file for each user running the bash shell. When the bash shell is opened, the file is read.
Current User:
~/.bash_profile
Each user can use the file to enter shell information dedicated to their own use, and when the user logs in, the
The file is only executed once! By default, he sets some environment variables to execute the user's. bashrc file.
~/.BASHRC
This file contains bash information dedicated to your bash shell, and when you log in and each time you open a new shell, the
The file is read.
~/.bash_logout executes the file each time it exits the system (exiting the bash shell).
bash_profile ,. BASHRC ,bash_logout
the above three files are the user Environment profile for the bash shell, which is located in the user's home directory.
. Bash_profile Is the most important configuration file that is read every time a user logs on to the system, and all commands inside it are executed by bash
. BASHRC
The file is read when the bash shell invokes another Bashshell, which is the file that is read when the Bash command is typed in the shell to launch a new shell. This effectively separates the environments required for logins and child shells. But in general, it will be called in. bash_profile. BASHRC scripts for unified configuration of user environments.
. Bash_logout is read when exiting the shell. So we can put some clean-up orders into this file. when you log on to Linux, the order of execution is: ~/.bash_profile, ~/.bash_login, ~/.profileif the ~/.bash_profile file exists, the ~/.BASHRC file is typically executed
linux-environment variable Configuration