I use ~/bin
for executables and scripts I wrote myself and /usr/local/bin
for executables and scripts I didn't write myself.
/usr/local/bin
is used by Homebrew, pip
(and gem
and npm
installed by Homebrew), as the default target for make install
, and by some .pkg
installers.
I used to have a separate directory for executables and scripts I didn't write myself and that weren't placed in /usr/local/bin
by default. But it contained so few files that I moved all files in it to /usr/local/bin
.
I can find the non-Homebrew stuff in /usr/local/bin
with find /usr/local/bin ! -lname '../Cellar/*'
.
I don't use /usr/local/bin
for scripts I wrote myself, because /usr/local/bin
already contains about 1000 other files, and ~/bin
(or bin
) is often easier to type.
I have added setenv PATH ~/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/libexec:/usr/texbin
to /etc/launchd.conf
. Having /usr/local/bin
before the other directories is potentially dangerous, and for example some TextMate commands stopped working because of it, but it's also convenient to have newer versions of commands before the system-installed versions and to use the same path everywhere.