environment variable configuration file for Shell programming

Source: Internet
Author: User

1. Introduction to environment variable configuration file

  

1.1 Source command:Source configuration file or . configuration file

After you modify the configuration file, you must log off and re-login to take effect, using the source command without having to log in again

1.2 Environment variable configuration file:

Defines system default environment variables, such as path, that are in effect for the operating environment of the system

1.3 Common environment variables when landing:

    

2. Environment variable configuration file function

  

The role of 2.1/etc/profile:

-User Variables

-LogName Variable

-Mail variables

-Path variable

-Hostname variable

-Histsize variable

-Umask

-Call the/etc/profile.d/*.sh file

The role of 2.2/ETC/BASHRC:

-PS1 variable

-Umask

-Path variable

-Call the/etc/profile.d/*sh file

The role of 2.3 ~/.bash_profile:

-called the ~/.BASHRC file

-Added ": $HOME/bin" to the directory after the PATH variable

The role of 2.4 ~/.BASHRC

-Define default aliases

-Call/ETC/BASHRC

3. Other environment variable configuration files

3.1 Environment variables in effect when you log off profile: ~/.bash_logout

3.2 History Command Store file: ~/.bash_history

3.3 Shell Login Information:

Local terminal welcome information:/etc/issue

      

Remote Terminal Welcome information:

      

Welcome information after Login (recommended):/ETC/MOTD

Both local and remote can be displayed

environment variable configuration file for Shell programming

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.