Mac OS X 10.7.2 lion modify and add Environment Variables

Source: Internet
Author: User

Mac OS X environment variable settings

First, check the shell:

Run echo $ Shell
If the output is CSH or tcsh, It is C shell.
If the output is Bash, sh, zsh, It is a variant of the Bourne shell.
Before Mac OS X 10.2, the default value is C shell.
The default value after Mac OS X 10.3 is the Bourne shell.

(1) if it is a Bourne shell.

Directly modify the file in. profile or. bash_profile in the main directory. If the file does not exist, generate one.
Usermatomacbook-Pro :~ User $ Pico. Profile // or use VI/vim.

For example, you need to add the path of tools in the Android-SDK to path (Android later moved some common tools such as ADB from tools to platform-tools), and then write it like this:

Export Path = $ path:/Android-SDK-MacOSX/tools
 
(2) c Shell
Just like (1), the edited file name is. cshrc.
Pico. cshrc
 

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.