At the user's point of view, there are two types of shells:
log-in Shell:
Log in normally via a client
Su-username or Su-l USERNAME
Non-logon shell:
Su USERNAME
Command window open under graphical terminal
Shell scripts that are executed automatically
Bash configuration file:
Global configuration:
/etc/profile,/etc/profile.d/*.sh,/ETC/BASHRC
Personal configuration:
~/.bash_profile, ~/.BASHRC
file for profile class:
Setting environment variables
Run commands and scripts
Files of the BASHRC class:
Setting Local Variables
Defining command aliases
How does the login shell read the configuration file?
~/.BASHRC, ~/.bash_profile ,/etc/profile,/etc/profile.d/*.sh, /ETC/BASHRC
How does a non-logon shell read a configuration file?
~/.BASHRC , /etc/bashrc ,/etc/profile.d/*. SH-& gt;
This article from the "90 Design Studio" blog, reproduced please contact the author!
Log-in Shell and non-logon shell