Linux System Modification Environment variable method __linux

Source: Internet
Author: User

Show environment variables: #echo $PAHT

Summary of common methods for modifying Linux environment variables (red for Paths to add):

1, #PATH = $PATH:/etc/apache/bin, this method is only valid for the current, that is, when you log off the system after the added path is invalid;

2, #vi/etc/profile, add path= $PATH in the appropriate position:/etc/apache/bin, this method modifies the system environment variable value, is valid for all users; executes source after modification Profile can take effect (that is, the equivalent of another/etc/profile shell script);

3, #vi ~/.bash_profile or VI ~/.bashrc, modify the path line, add the paths that need to be added, the method is only valid for the current user, and execute source. bash_profile or source after the modification. BASHRC

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.