2

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?

segfault
  • 1,450

1 Answers1

2

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:

slhck
  • 235,242