Shell basics-environment variable configuration file,

Source: Internet
Author: User

Shell basics-environment variable configuration file,

Shell basics-environment variable configuration file

 

Source configuration file or. configuration file:

After the environment variables are written to the configuration file, You need to log on again to take effect. Instead, you can directly use the source command to take effect.

Main configuration files:

/Etc/profile

/Etc/profile. d/*. sh

~ /. Bash_profile

~ /. Bashrc

/Etc/bashrc

The/etc/profile. d/*. sh/etc/bashrc takes effect for all users.

~ /. Bash_profile ~ /. Bashrc only applies to the current user

Call Sequence of environment variable configuration files

# Images cannot be displayed. You can chat privately if necessary.

Role of the configuration file/etc/profile

USER variable

LOGNAME variable

MAIL variable

PATA variable

HOSTNAME variable

HISTSIZE variable

Umask

Call the/etc/profile. d/*. sh File

 

Configuration File ~ /. Role of bash_profile

Call ~ /. Bashrc File

Add the ": $ HOME/bin" directory to the PATH variable.

 

Shell logon information

Welcome to the local terminal:/etc/issue

 

# Images cannot be displayed. You can chat privately if necessary.

 

Remote login information file (the above Escape Character cannot be used in this folder, only plain text information can be written):/etc/issue.net

Whether to display the welcome information is determined by the ssh configuration file/etc/ssh/sshd_config. You can add the "Banner/etc/issue.net" line to display the information and restart the SSH service.

 

Welcome Message for remote and local Logon:/etc/motd

 

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.