Setting Environment Variables on Mac OS X

This is the way I do it and I’m storing the info here because I’ve already looked it up on 3 different occasions.

I store them in my bash profile. To edit that file simply use the following in the terminal:

subl ~/.bash_profile

I use Sublime text editor. You can substitute nano or vm or the command for your preferred editor of choice.

You’ll see stuff like: export SOME_ENVIRONMENT_VARIABLE=”foo”, add whatever you need to add.

After you’ve made your changes you’ll probably want those changes to affect the terminal window you are currently working in. To do that type:

source ~/.bash_profile

Done.

Shortcuts

Where is Dan?


My Blog
My Blog
Twitter
Twitter
Facebook
Facebook
LinkedIn
LinkedIn
Flickr
Flickr
YouTube
YouTube
Delicious
Delicious
Foursquare
Foursquare
Pinterest
Pinterest
GetGlue
GetGlue
Pintley
Pintley
XBOX Live
XBOX Live
Last.fm
Last.fm
Windows Live
Windows Live
Telligent.com
Telligent
Graffiti CMS on CodePlex
Graffiti CMS
Popular

Recent Posts