4.9. /usr/local : Local hierarchy

4.9.1. Purpose

The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr.

Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr. [28]

4.9.2. Requirements

The following directories, or symbolic links to directories, must be in /usr/local

DirectoryDescription
binLocal binaries
etcHost-specific system configuration for local binaries
gamesLocal game binaries
includeLocal C header files
libLocal libraries
manLocal online manuals
sbinLocal system binaries
shareLocal architecture-independent hierarchy
srcLocal source code

No other directories, except those listed below, may be in /usr/local after first installing a FHS-compliant system.

4.9.3. Specific Options

If directories /lib<qual> or /usr/lib<qual> exist, the equivalent directories must also exist in /usr/local.

/usr/local/etc may be a symbolic link to /etc/local.

Rationale

The consistency of /usr/local/etc is beneficial to installers, and is already used in other systems. As all of /usr/local needs to be backed up to reproduce a system, it introduces no additional maintenance overhead, but a symlink to /etc/local is suitable if systems want all their configuration under one hierarchy.

Note that /usr/etc is still not allowed: programs in /usr should place configuration files in /etc.

If the directory /usr/share/color exists as specified in this document, then the directory /usr/local/share/color must also exist, governed by the same rules as /usr/share/color.

Rationale

This usage allows the sysadmin a place to install color profiles manually when necessary.

4.9.4. /usr/local/share : Local architecture-independent hierarchy

The requirements for the contents of this directory are the same as for /usr/share.



[28] Software placed in / or /usr may be overwritten by system upgrades (though we recommend that distributions do not overwrite data in /etc under these circumstances). For this reason, local software must not be placed outside of /usr/local without good reason.