Re: PATH: /usr/local before or after /usr ?

From: Rodney W. Grimes <>
Date: Fri, 16 Jul 2021 16:35:16 UTC
> On Fri, 16 Jul 2021 09:01:49 -0600
> Alan Somers <> wrote:
> > FreeBSD has always placed /usr/local/X after /usr/X in the default
> > PATH. AFAICT that convention began with SVN revision 37 "Initial
> > import of 386BSD 0.1 othersrc/etc".  Why is that?  It would make
> > sense to me that /usr/local/X should come first.  That way programs
> > installed from ports can override FreeBSD's defaults.
> I think that is exactly what you don't want to happen by default
> (imagine all the ways the system could fall apart in a really hard to
> support ways if individual standard tools from base are overridden -
> especially as many users might not even notice, as it might be a
> side-effect of installing some dependency of something they need).

Michael states the exact reasoning that was used, and has been used
repeatidly over history for this ordering of path.

Any alteration of that ordering leads to issues with deterministic
behavior is the bottom line.

> Users are always free to tweak PATH for their purposes of course, but
> running the UNIX tools that came with the OS by default makes a lot
> of sense to me.

Others have noted use of aliases which is a good way to handle
this.  Global aliases can be installed in /etc/csh.cshrc or
/etc/profile, other shells have similiar global config files.

> -m
> >  Is there a
> > good reason for this convention, or is it just inertia?

Good reason(s).

> > -Alan
> -- 
> Michael Gmelin
Rod Grimes