What is the proper way to modify environment variables like PATH in OS X?
I\'ve looked on Google a little bit and found three different files to edit:
Well, I'm unsure about the /etc/paths
and ~/.MacOSX/environment.plist
files. Those are new.
But with Bash, you should know that .bashrc
is executed with every new shell invocation
and .bash_profile
is only executed once at startup.
I don't know how often this is with Mac OS X. I think the distinction has broken down with the window system launching everything.
Personally, I eliminate the confusion by creating a .bashrc
file with everything I need and then do:
ln -s .bashrc .bash_profile