[Note] Login Shell vs. non-logon shell

Source: Internet
Author: User

Log-in Shell:
Login via terminal
Su-username
Non-logon Shell:
Su USERNAME (switch user with Su, without parameters)
Open Command Window under GUI
Shell scripts executed automatically (using at, crontab, Anacron, etc.)

Bash configuration file:
Global configuration:/ETC/PROFILE,/ETC/PROFILE.D/*.SH,/ETC/BASHRC
Personal configuration: ~/.BASH_PROFILE,~/.BASHRC
Profile class Files: Setting environment variables, running commands or scripts
BASHRC files: Setting local variables, defining command aliases

Log-in Shell:
Start Script load Order:/etc/profile---/etc/profile.d/*---~/.bash_profile---~/.BASHRC---/ETC/BASHRC
Note:/etc/profile is the first startup script that runs after the logon shell starts, and the non-logon shell does not use the script
The script for each call revokes the changes in the previous call script in turn,

You can use certain tasks such as creating an automatic backup, clearing temporary files to write to the ~/.bash_logout file to achieve the purpose of automatically performing related tasks each time you exit the login shell
Non-sign-on shell
Load startup script order: ~/.BASHRC-/ETC/BASHRC-/etc/profile.d/*




^_^

This article is from the "junight" blog, make sure to keep this source http://junight.blog.51cto.com/10828785/1728748

[Note] Login Shell vs. non-logon shell

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.