Shell startup File 1. when logging on to a non-logon or interactive non-interactive shell user (after entering the user name and password), the shell started is the login shell, after logon, you can use bash -- login to start a logon shell. the user starts the shell to explain that the command is an interactive shell...
Shell startup File 1. when logging on to a non-logon or interactive non-interactive shell user (after entering the user name and password), the shell started is the login shell, after logon, you can still use bash -- login to start a login shell. the user starts the shell to explain that the command is an interactive shell, and the start shell is used to execute the script for non-interactive shell 2. the startup file of the non-interactive shell is defined in the BASH_ENV variable, which is generally empty. Www.2cto.com 3. the startup file of the interactive login shell is/etc/profile and search for it in sequence ~ /. Bash_profile ,~ /. Bash_login and ~ /. Profile: the one that is first found. 4. the startup file of the interactive non-logon shell is ~ /. Bashrc. Usually in ~ /. Bash_profile (or two other files ~ /. During The bashrc test, it is found that the alias set by the parent shell cannot be passed to the subshell. If the alias set before the non-interactive shell is started, it cannot be used in the script. In fact, this is no big deal, just run the source command in the original shell. Author zzxian
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.