To log in normally through a terminal, you need to enter a user name and password.
Using Su-username
Using su-l username
SU username
Open terminal window under graphics terminal
Shell scripts that are executed automatically
Configuration files used by the global configuration:
/etc/profile/etc/profile.d/*.sh/etc/bashrc
Edit any one of the above 3 profiles, which will take effect for all users.
The configuration file used is located in the user's home directory under the following two files:
~/.bash_profile ~/.BASHRC
The above two files are only valid for the current user.
If the global configuration and personal configuration cause a conflict, then the personal configuration takes precedence.
Define environment variables.
Run the command or script.
Defining local Variables
Defining command aliases
How does the login shell read the configuration file?
/etc/profile--/etc/profile.d/*.sh--and ~/.bash_profile--~/.BASHRC--/ETC/BASHRC
How does the non-login shell read the configuration file?
~/.BASHRC--/ETC/BASHRC-/etc/profile.d/*.sh
This article from "Love Open source, happy to share!" "Blog, be sure to keep this provenance http://hezhanglinux.blog.51cto.com/10861477/1711031
Bash Series (1)--shell type