Skip to content

Instantly share code, notes, and snippets.

@puccaso
puccaso / path-in-mac-osx-10.7.mdown
Created Mar 30, 2017 — forked from Overbryd/path-in-mac-osx-10.7.mdown
Correcting $PATH in MacOSX 10.7 for homebrew
View path-in-mac-osx-10.7.mdown

$PATH in MacOSX 10.7

MacOSX has a truly global path setting that precedes any other setting like ~/.bash_profile. The file /private/etc/paths is a list of pathnames. The order from top to bottom defines the resulting order in the $PATH variable. After loading /private/etc/paths there is a directory /private/etc/paths.d/ with files in the same style. Those are appended to the $PATH variable.

The default content of /private/etc/paths looks like this:

/usr/bin
/bin