Problems setting PATH variable in Lion

Joined
Oct 28, 2011
Messages
2
Reaction score
0
Points
1
Hello, can anyone tell me why OS X Lion won't save my PATH when I add a new path to it? I use export PATH=$PATH:/"my_pathhere" to add the path that I want added. Upon typing echo $PATH before I close the terminal window it shows up in the path. However, once I exit the terminal window and re-open it the new path variable no longer shows up? I don't get it. I have just upgraded to Lion from Snow Leopard and did this exact same thing no longer than a week ago in Snow Leopard and had no problem. :Confused:
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
Because you're never saved it to your profile, you've only loaded it into memory.

Try this.

echo "export PATH=$PATH:/path/to/whatever" >> .bash_profile

when done, then do

. .bash_profile

That should reload the profile and make the path change persistent
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top