Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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.

add comment

1 Answer

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:

/etc/paths.d

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

/Users/your-user/bin

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

For the graphical environment

Create the following file:

~/.MacOSX/environment.plist

Add variables to this preference list like so:

share|improve this answer
add comment

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