Is there a problem with having /usr/local/bin before /usr/bin on the path in OS X?

By default, OS X 10.6 uses /usr/libexec/path_helper to add the following paths listed in the file /etc/paths:

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

This means that /usr/bin comes before /usr/local/bin on the path. This results in the version of git installed by Xcode 4 in /usr/bin to be called instead of the version installed by Homebrew into /usr/local/bin.

Which leads me to my question, is there a problem with having /usr/local/bin come before /usr/bin in the path? Is there a specific reason that Apple defaults to having /usr/bin come before /usr/local/bin?

How to change order of /usr/bin and /usr/local/bin

Is it a problem to move /usr/local/bin from the bottom of the file /etc/paths to the top? Doing so would impact the path for more than just when I fire up Terminal, since /usr/libexec/path_helper could be used by other resources (I'm uncertain about this).

While redundant, it seems safer for me to add /usr/local/bin to the path in ~/.bash_profile, which would mean that /usr/local/bin would be on the path twice.


No, and no. They're just weird ... local by definition should override.


I had trouble with same problem, and found the link below from googling.

https://discussions.apple.com/thread/3588837?start=0&tstart=0

They said that modifying /etc/paths is not a good idea for security reasons.