Configuration Files Read by Linux users during shell logon and logon
From the perspective of user login, SHELL type:
Login shell:
Log On Through a terminal normally
Su-USERNAME
Su-l USERNAME
Non-Logon shell:
Su USERNAME (use su to switch users without any parameters)
Open the command window in GUI
Automatically executed shell script
Bash configuration file:
Global Configuration
/Etc/profile,/etc/profile. d/*. sh,/etc/bashrc
Personal Configuration
~ /. Bash_profile ,~ /. Bashrc
Profile files:
Set Environment Variables
Run commands or scripts
Bashrc files:
Set local variables
Define command alias
How to read the configuration file using a logon shell:
/Etc/profile -->/etc/profile. d/*. sh --> ~ /. Bash_profile --> ~ /. Bashrc -->/etc/bashrc
How does a non-Logon shell read the configuration file:
~ /. Bashrc -->/etc/profile. d/*. sh
This article permanently updates the link address: