Monday, August 11, 2014

How to edit PATH environment variable on Mac OS X?

Edit Your PATH Environment Variable in Mac OS X

You Can Follow the following Steps:
STEP-1
Open up a Terminal window (this is in your Applications/Utilites folder by default)

STEP-2  Enter the follow commands in your terminal:

touch ~/.bash_profile; open ~/.bash_profile

This will open the .bash_profile file in Text Edit   like 

STEP-3  Add the following line to the end of the file adding whatever additional directory you want in your path:
export PATH="$HOME/.rbenv/bin:$PATH"

STEP-4  Save the .bash_profile file and Quit  Text Edit.
STEP-5  Force the .bash_profile to execute. For this run the following command on your terminal
source ~/.bash_profile
Then for check your newly added PATH, Open new terminal window and run the following
echo $PATH
You should now see the values you want in your PATH.
[N.B. The green sentences are the terminal commands.  Updated in 11-08-2014]

No comments:

Post a Comment