Home

usrlocal

usr/local is a directory tree used on Unix-like systems to hold software and data that are installed locally by the system administrator or by users, separate from the software provided by the operating system’s package manager. The goal is to keep locally installed programs from being overwritten by system updates and to provide a stable space for custom or vendor-supplied software.

The typical layout includes /usr/local/bin for executable programs, /usr/local/sbin for privileged executables, /usr/local/lib and /usr/local/lib64 for

Path and library resolution commonly favor /usr/local over the system-wide locations. As a result, executables placed

Standards and context: /usr/local is a sanctioned part of the Filesystem Hierarchy Standard (FHS) and is widely

Best practices include configuring builds with a prefix of /usr/local and managing permissions so that root

libraries,
/usr/local/include
for
header
files,
/usr/local/share
for
architecture-independent
data,
/usr/local/etc
for
configuration
files,
/usr/local/var
for
variable
data,
/usr/local/share/man
for
manual
pages,
and
/usr/local/src
for
source
code.
Some
systems
also
maintain
subdirectories
such
as
/usr/local/libexec
or
/usr/local/share/doc.
in
/usr/local/bin
are
typically
found
before
those
in
/usr/bin,
and
the
linker
may
prefer
libraries
in
/usr/local/lib
when
the
system
is
configured
accordingly.
This
behavior
makes
/usr/local
a
convenient
place
for
locally
built
or
vendor-supplied
software.
used
across
Unix-like
systems,
including
Linux,
BSD
variants,
and
macOS.
It
is
distinct
from
/opt,
which
is
often
used
for
prepackaged
add-on
software
from
vendors,
sometimes
outside
the
system’s
normal
path.
owns
the
tree
while
allowing
necessary
write
access
for
administrative
processes.