Shell scripts, the configuration file load order, and when to load.

Source: Internet
Author: User

In the Linux system, there are/ETC/PROFILE,/ETC/BASHRC, ~/.BASH_PROFILE,~/BASHRC these four configuration files, these files, will be automatically loaded at some point, that is, a little bit, usually are some aliases, special variables inside. Four have the loading order, the first load is the etc beginning of the/etc/profile, then the/ETC/.BASHRC, some versions are not/ETC/.BASHRC already, these two are called the global, and then
The profile BASHRC under the home directory will be loaded according to the logged-in user. Why is it so loaded for a reason?
If the global settings a=1, your home directory itself set a=2, to the local, that is, a=2, because it after loading, will overwrite before setting this is the order, when loading, all the profile files, only in the boot load once, All BASHRC files are loaded once each time a new shell is opened.

Shell scripts, the configuration file load order, and when to load.

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.