osx

Set environment variables

Introduction#

In Mac OS X, you can set the environment variables in one of the following files :

~/.bashrc

~/.bash_profile

~/.profile

By default, Mac OS X does not has above files, you need to create it manually.

Add a path

1.vim ~/.bash_profile

The file may not exist (if not, you can just create it).

2.type in this and save the file:

export PATH=$PATH:YOUR_PATH_HERE

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow