Shell Programming-environment variable configuration file

Source: Internet
Author: User

1.source command

After you modify the configuration file, you must log off and re-login to take effect, using the source command can not re-login

Source Configuration file

. Configuration file

The environment variable configuration file is primarily defined as a system default environment variable that is in effect for the system operating environment.

System login to load the configuration file, placed in/etc will be:

/etc/profile

/etc/profile.d/*.sh

~/.bashrc

~/.bash_profile

/etc/bashrc

2. Function of environment variable configuration file

Normal loading:

SU Switch User

The role of/etc/profile:

User variable:

LOGNAME:

MAIL:

PATH:

HOSTNAME:

Histsize:

Umask

Calling the/etc/profile.d/*.sh file

Umaks Permissions:

Maximum file permissions is 666

The maximum directory permission is 777

Permissions cannot be converted using numbers, but must use letters

Umask defined permissions are the permissions that are ready to be discarded in the system default permissions

666-033:rw-rw-rw-elimination----WX-WX = = rw-r--r--644

The role of ~/.bash_profile:

Called the ~/.BASHRC file

The directory ": $HOME/bin" is accessed after the path variable.

~/.BASHRC: Defining aliases and calling/ETC/BASHRC

The role of/ETC/BASHRC:

PS1 variable

Umask (no definition of login process)

Path variable (no definition of login process)

Calling the/etc/profile.d/*.sh file

3. Other configuration files

environment variable profile in effect when logging off

/.bash_logout

~/.bash_history

Shell Programming-environment variable configuration file

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.