Possible Duplicate:
What are PATH and other environment variables, and how can I set or use them?

I want to add a path variable to the directory ~/bin

How should I do it in OS X Lion?

marked as duplicate by slhck, Dennis, random Jun 8 '12 at 1:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The answer to your question really shouldn't be that hard to find.

For your shell

Just add

export PATH=/Users/your-user/bin:$PATH

in one of the shell configuration files, e.g. ~/.bash_profile or ~/.profile if you don't have the former one.

For all users

You can also set paths system-wide in the following folder:


By creating a file, e.g. naming it custom, then adding one line per path you want to add, e.g.


That obviously doesn't make a lot of sense if these binaries belong to you.

For the graphical environment

Create the following file:


Add variables to this preference list like so:

Not the answer you're looking for? Browse other questions tagged or ask your own question.