Bash Series (1)--shell type

Source: Internet
Author: User

    • Login shell (requires a password)

To log in normally through a terminal, you need to enter a user name and password.

Using Su-username

Using su-l username


    • Non-login shell (no password required)

SU username

Open terminal window under graphics terminal

Shell scripts that are executed automatically


    • Bash configuration file:

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.


    • Personal configuration

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.


    • File function of profile class:

Define environment variables.

Run the command or script.


    • The role of the BASHRC class file:

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

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.