Set the environment variable: set environment variables at MAC (rpm)

Set the environment variable in the mac

The program is developed based on the operating system unix / linux, the use of environment variables will be easy. By setting the environment variable can be set to execute the program in the directory in any directory by typing the program name. Without going through the working directory cd change to the program directory and then execute the program. And eliminating the need to enter "./" is.
Long story short, the following steps (in the bash):
www.2cto.com
. 1, open Applications -> Utilities -> terminal;
2, positioned in the terminal user's own home directory, enter: cd ~;

3, create an empty file, enter: Touch .bash_profile;
. 4, edit the document, enter: Open .bash_profile;
. 5, in this document input: export PATH = $ {PATH} :; ( the " 'they want to replace to catalog) export PATH = $ {PATH} : / Users / rye / android / android-sdk-mac_x86 / tools;

6, if the need to add another example the JAVA_HOME environment variable, enter: Export the JAVA_HOME = / Library / the Java / Home;
. 7, the terminal restart Source .bash_profile test.

Author abc20899
http://www.2cto.com/os/201208/147989.html

Reproduced in: https: //www.cnblogs.com/xu-thinking/p/3637502.html

Guess you like

Origin blog.csdn.net/weixin_33908217/article/details/93374833