editing PATH variable on mac
How to edit PATH variable on mac (Lion). I cannot find any file where I can add paths. can someone guide me about it?
Whats the file name? .profile or .bash_profile???
and where I can find it? I have tried
echo 'export PATH=/android-sdk/tools:$PATH' >> ~/.profile
/etc/paths. Then close the terminal and reopen it.
$ sudo vi /etc/paths
Note: each entry is seperated by line breaks.
/usr/local/bin /usr/bin /bin /usr/sbin /sbin
Read more... Read less...
You could try this:
- Open the Terminal application. It can be found in the Utilities directory inside the Applications directory.
- Type the following: echo 'export PATH=YOURPATHHERE:$PATH' >> ~/.profile, replacing "YOURPATHHERE" with the name of the directory you want to add. Make certain that you use ">>" instead of one ">".
- Hit Enter.
- Close the Terminal and reopen. Your new Terminal session should now use the new PATH.
environment.plst file loads first on MAC so put the path on it.
For 1st time use, use the following command
export PATH=$PATH: /path/to/set
(see Runtime Configuration Guidelines)