Set path (global variable) in Mac)

Source: Internet
Author: User
1 first, check the path command: $ Path 2 how to set the path command: Echo "Export Path = xxxxxx: $ path" >> ~ /. Bash_profile explanation: Print "Export Path = xxxxxx: $ path" ~ /. Bash_profile. 3. UNIX knowledge supplement :~ /. Bash_profile description Mac and Linux terminals are generally parsed using bash. After bash finishes reading the/etc/profile of the overall environment variable and calls other configuration files, it then reads the User-Defined personal configuration file. Bash reads three types of files :~ /. Bash_profile ~ /. Bash_login ~ /. Profile is actually one of the files read-only when Bash is restarted, and the read order is in the above Order. That is to say, reading bash_profile will not be followed by reading it. If bash_profile does not exist, the following will be available. Let's take a look at what is in bash_profile: Command: CAT ~ /. Bash_profile the last time you restart your terminal, there will be the global variable you just set. [Updated on February 28,] The most intuitive method is Cd ~ Open. bash_profile will be used directly at this time ProgramOpening this configuration file is much simpler and more intuitive than setting in the terminal. Note that the variables in the configuration file will be overwritten. For example, if export Path = 1 Export Path = 2, then the next 2 will overwrite the previous 1.

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.