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
Based on my own experiences and internet search, I find these places work:
/etc/paths.d
~/.bash_profile
Note that you should open a new terminal window to see the changes.
You may also refer to this this question
Open and edit /etc/paths
using any text editor.
$ sudo vi /etc/paths
(editing text files with vi)
Note: each entry is separated by a new line
/usr/local/bin /usr/bin /bin /usr/sbin /sbin
Save and close the file. Then restart your terminal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With