Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to set the $PATH variable for all users but don't find where it is defined.

Having no $PATH export in my .bash_profile I have this


Where is this defined?

share|improve this question
up vote 4 down vote accepted

On shell level, $PATH is set in /etc/profile by calling /usr/libexec/path_helper. To add your own paths, you can add files with a path in it to /etc/paths.d/:

pse@Fourecks:~$ ll /etc/paths.d
total 8
-rw-r--r--  1 root  wheel  13 Jul 22 07:02 50-X11
-rw-r--r--  1 root  wheel  12 Aug 13 14:12 TeX
pse@Fourecks:~$ cat /etc/paths.d/TeX 

That's the safer way than editing /etc/profile or any other system file which may get overwritten with the next OSX upgrade.

share|improve this answer
excellent, thank you – kaklon Dec 8 '11 at 18:49

Well, if you really wanted to OVERWRITE the path, you could just set the new one in /etc/launchd.conf. There is a similar question here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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