5

I have edited /private/etc/paths to allow access for Homebrew:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

I want to restore this file to the system Defaults. What are the default lines and default order?

11

The default content of /etc/paths until Mavericks (10.9) is:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

The default content of /etc/paths since Yosemite (10.10) is:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
2

In OS X 10.11 ( El Capitan ) the order and content of /etc/paths is:

 /usr/local/bin
 /usr/bin
 /bin
 /usr/sbin
 /sbin

Additionally, having installed Xquartz via MacPorts, I note the addition of one entry in /etc/paths.d/ called 40-XQuartz, which contains the following:

 /opt/X11/bin

As I recall, convention has it that /etc/paths is evaluated first, with any entries in /etc/paths.d being appended. Some optional / additional package managers make modifications to either the .profile or .bashrc at the root level of your user's home directory.

Are you having problems with the PATH variable related to optional / additional package managers like home-brew?

Warm Regards,

F.

  • Thanks for your reply! The reason I wanted to revert to default is because I decided to export the path in .bash_profile instead via: export PATH="/usr/local/bin:$PATH". I too have XQuartz installed, but I don't have /opt/X11/bin in /private/etc/paths nor .bash_profile. When running which xquartz it says /opt/X11/bin/xquartz. So I'm assuming that is appended from etc/paths.d automatically like you said. – Winterflags Nov 14 '15 at 18:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .