Super User is a question and answer site for computer enthusiasts and power users. 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

Possible Duplicate:
How do I set PATH and other environment variables?

I recently installed git via the installer from here (not via homebrew or stuff...) and found that it added itself to my $PATH.

I wonder, where did it do that? I checked my ~/.bashrc and also /etc/bashrc and /etc/profile, nowhere is a line like PATH=$PATH:/usr/local/git/bin

Out of curiosity, where did the git-installer put the change to the path??

share|improve this question

migrated from Jun 12 '11 at 12:38

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Daniel Beck, slhck, studiohack Jun 13 '11 at 0:20

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.

Related (with good section on Mac OS X, that already contains both answers from OS). – Daniel Beck Jun 12 '11 at 12:41
I don't know about OSX, but on linux, your bash profile generally sources /etc/profile, which then sources /etc/profile.d/*.sh. – Jefromi Jun 12 '11 at 15:49
IMO this question isn't a duplicate. The OP knows how stuff is usually added to the PATH, but git does it in an unusual way. Jefromi is correct - in the /etc/paths.d directory, there is a file named git containing the path to the git binary. – cantera25 Jun 28 '15 at 0:11

Have a look in /etc/paths.d/. If there is a file called git, this is how your $PATH is manipulated.

Since Leopard, there is an alternative method for manipulating the PATH by adding text files to /etc/paths.d/ containing lines that will be appended to the PATH variable. Kind of simple, but it does cause issues if you aren't aware of it.

EDIT: There is also a corresponding /etc/manpaths.d/

share|improve this answer

Perhaps it's located in /etc/paths??

cat /etc/paths
share|improve this answer