linux login shell execution order

.Bash_history #, .bash_logout, .bash_profile, .bashrc
/ etc / Profile Global
.bash_history currently logged in user history recording command operation
.bash_logout command to execute when the user logs out the current
contents executed when interactive logon .bash_profile
.bashrc non-interactive Sign-content execution

Example:
the root user to switch to the oracle user
# 1. interactive login , shell order of execution: SU - oracle
/ etc / Profile
~ / .bash_profile
~ / .bash_login
~ / .profile
# 2. noninteractive log , shell execution order: Oracle SU
/ etc / bashrc
~ / .bashrc

So when there is an error similar to the following, you should consider switching the way users log in

 lsnrctl status
bash: lsnrctl: command not found

 

Guess you like

Origin www.cnblogs.com/kwing0117/p/11511725.html