Linux Command -- bash shell configuration, linuxbash
I. shell Type
From the perspective of user login, shell types include:
1. logon shell: (read environment configuration)
Normally log on through a terminal:
Su-USERNAME
Su-l USERNAME
2. Non-Logon shell: (do not read environment configuration)
Su USERNAME
Command window opened on the graphic Terminal
Automatically executed shell script
2. bash configuration file:
Global Configuration:
/Etc/profile,/etc/profile. d/*. sh,/etc/bashrc
Personal Configuration:
~ /. Bash_profile ,~ /. Bashrc
The preceding configurations can be divided into two types:
Profile files:Set Environment Variables
(When a user logs on) run commands or scripts
Bashrc files:Set local variables
Define command alias
How does the login shell read the configuration file?
/Etc/profile-->/Etc/profile. d/*. sh -->~ /. Bash_profile--~ /. Bashrc -->/etc/bashrc
How does a non-login shell read the configuration file?
~ /. Bashrc -->/etc/profile. d/*. sh