Linux sudo system environment variables user environment variables

Source: Internet
Author: User

1. Sudo is an ordinary user who temporarily has root privileges. The advantage is that most of the time with user-defined configurations, a few cases can be done with sudo for root privileges.

Therefore, it is important to note that after you have used sudo, you are no longer the original user, and you cannot use your own commands. As an example: sudo source ... The command fails to execute, prompting for no source command. But you get rid of sudo and you can do it again. (from the side can reflect sudo is not equal to get root all rights.) Do not misuse sudo.

2. System environment variables, corresponding to the/etc/profile file, valid for all users. The user environment variable, corresponding to the ~/.BASHRC file, is only valid for its own users.

Therefore, in non-root situations, most environment variables are recommended to operate on ~/.BASHRC.

Linux sudo system environment variables user environment variables

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.