Shell basics-environment variable configuration file,
Shell basics-environment variable configuration file
Source configuration file or. configuration file:
After the environment variables are written to the configuration file, You need to log on again to take effect. Instead, you can directly use the source command to take effect.
Main configuration files:
/Etc/profile
/Etc/profile. d/*. sh
~ /. Bash_profile
~ /. Bashrc
/Etc/bashrc
The/etc/profile. d/*. sh/etc/bashrc takes effect for all users.
~ /. Bash_profile ~ /. Bashrc only applies to the current user
Call Sequence of environment variable configuration files
# Images cannot be displayed. You can chat privately if necessary.
Role of the configuration file/etc/profile
USER variable
LOGNAME variable
MAIL variable
PATA variable
HOSTNAME variable
HISTSIZE variable
Umask
Call the/etc/profile. d/*. sh File
Configuration File ~ /. Role of bash_profile
Call ~ /. Bashrc File
Add the ": $ HOME/bin" directory to the PATH variable.
Shell logon information
Welcome to the local terminal:/etc/issue
# Images cannot be displayed. You can chat privately if necessary.
Remote login information file (the above Escape Character cannot be used in this folder, only plain text information can be written):/etc/issue.net
Whether to display the welcome information is determined by the ssh configuration file/etc/ssh/sshd_config. You can add the "Banner/etc/issue.net" line to display the information and restart the SSH service.
Welcome Message for remote and local Logon:/etc/motd