Failed to change $ PATH on Mac OS X Yosemite
I just want to start by developing Android Apps on my new Mac. So I have to add platform-tools and tools from Eclipsebundle to my $ PATH.
The first thing I did was add these two folders to my local admin account, which did a great job with the command:
echo 'export PATH=/Users/myname/Desktop/adtbundle/sdk/platform-tools:"$PATH"' >> ~/.profile
echo 'export PATH=/Users/myname/Desktop/adtbundle/sdk/tools:"$PATH"' >> ~/.profile
So, I added MacMini to our domain and logged into my account, which is saved in our active directory.
I opened terminal again and typed two commands, but after that, while I want to check my new $ PATH ( echo $PATH
), my $ PATH hasn't changed. It only contains standard folders.
I looked for another How-To for editing $ PATH and tried it like this:
cd
nano .bash_profile
in my .bash_profile i added:
export PATH="/Users/myname/Desktop/adtbundle/sdk/platform-tools:$PATH"
export PATH="/Users/myname/Desktop/adtbundle/sdk/tools:$PATH"
saved everything with control + o
confirmed name by pressing return
and then exit nano by pressingcontrol + x
tried checking my new $ PATH -> it hasn't changed and my bash_profile is empty again - can someone tell me what I did wrong?
IT WORKS FOR ME http://www.cyberciti.biz/faq/appleosx-bash-unix-change-set-path-environment-variable/
After adding the path to .bash_profile, close the terminal and reopen it. try repeating $ PATH. This worked for me. otherwise you can add the path to / etc / profile.
After editing .bash_profile, refresh your bash environment by restarting the terminal or by entering the following command:
source ~/.bash_profile
The ' source ' command will execute the contents of the supplied argument.