MAC environment variable Modification

Source: Internet
Author: User
MAC environment variable Modification User Environment variables

1. Modify FILE: $vi ~/.bash_profile
2. Add a path to the file: path= $PATH:p ath1:path2:pathn (path is replaced with the paths you need)
3. Refresh: $source. bash_profile
4. See if the success: $echo $PATH

If the system is updated, the configuration may fail, and the system environment variable should be configured if it is permanently changed

System Environment variables

1. Mac system By default the file that we want to edit is read-only, so modify the file permissions first $sudo chmod 777/etc/profile
2. Enter your password
3. $vi/etc/profile
4. Add a path to the file: path= $PATH:p ath1:path2:pathn (path is replaced with the paths that you need, separated by a half-width colon between each path)
5. Save and exit
6. Restore file permissions: $sudo chmod 444/etc/profile
7. Restart your computer
8. Open terminal to see if it was successful: \ $echo \ $PATH

Appendix 1 Common Path addresses

Java:

Java_home= "/home/fuke-ubuntu/android/jdk1.8.0_25" classpath=.:\ $JAVA _home/lib/dt.jar:\ $JAVA _home/lib/tools.jarpath=\ $PATH: \ $JAVA _home/bin:\ $JAVA _home/jre/bin
Appendix 2 References

How MAC OS Java environment variables are configured
Linux file permissions
Modify Linux file Permissions chmod
Digital representation in file permission settings under Linux

MAC environment variable Modification

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.