The difference between Redhat Linux/etc/profile and/ETC/BASHRC

Source: Internet
Author: User

Recently studied Rhce, Umask here, the book said to modify/etc/profile and/ETC/BASHRC two files, but did not explain the two differences. So after viewing the Internet, I understand how each is used. /etc/profile is the corresponding login,/ETC/BASHRC is the corresponding open shell. But the actual use of the difference between, if BASHRC is the corresponding shell, then change this file is not OK? Finally, the practice of their own, the discovery is still different, hereby share, also make a record.

Experiment Preparation: Change the umask in the/etc/profile file to 007 and change the umask in/ETC/BASHRC to 077.

Experimental steps:

1. Log in as root and open the Shell,umask value 022

2.su test, Umask value 077

3.su-test,umask value 007

Experimental results: If you just switch users and do not log back in, then the profile script will not execute, thus the script in the BASHRC function.

So, if you do not want to make ambiguity for their management of the trouble, or honestly change two documents it. Since there is no time to write the program, but if you are not mistaken, the program should use the value in the BASHRC.

The difference between Redhat Linux/etc/profile and/ETC/BASHRC

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.