Shell Foundation-environment variable configuration file
Source configuration file or. Configuration file:
After the environment variable is written to the configuration file, the user needs to re-login to take effect, but with the source command, it can directly take effect
Main configuration files:
/etc/profile
/etc/profile.d/*.sh
~/.bash_profile
~/.bashrc
/etc/bashrc
Where/ETC/PROFILE/ETC/PROFILE.D/*.SH/ETC/BASHRC is valid for all users
~/.bash_profile ~/.BASHRC only valid for current user
environment variable configuration file invocation order
#无法显示图片, you need a private chat.
The role of configuration file/etc/profile
User variable
LogName variable
Mail variables
PATA variable
Hostname variable
Histsize variable
Umask
Calling the/etc/profile.d/*.sh file
The role of configuration file ~/.bash_profile
Calling the ~/.BASHRC file
After the path variable, add ": $HOME/bin" to this directory
Shell Login Information
Local terminal welcome information:/etc/issue
#无法显示图片, you need a private chat.
Remote Login information file (the above escape character cannot be used for this folder, only plain text information is written):/etc/issue.net
Whether this welcome message is displayed is determined by the SSH configuration file,/etc/ssh/sshd_config, to the "banner/etc/issue.net" line to display, and to restart the SSH service
Post-logon welcome information for both remote and local:/ETC/MOTD
Shell Foundation-environment variable configuration file