The /usr Hierarchy.
/usr is shareable, read-only data. ie. You should be able to mount /usr
read-only on multiple machines. Any information that is host-specific or
varies with time is stored elsewhere. No large package should use a direct
subdirectory under /usr. An exception is made for the X Window System
because of 'considerable precedent'.
/usr contains
- X11R6
- X386
- bin
- games
- include
- lib
- libexec
- local
- sbin
- share
- src
As well as this, to maintain compatibility with older systems there are often
the following symbolic links.
- /usr/adm -> /var/log
- /usr/preserve -> /var/state/<editor>
- /usr/spool -> /var/spool
- /usr/tmp -> /var/tmp
- /usr/spool/locks-> /var/lock
A brief introduction to the subdirectories.
- X11R6
- X Window System, version 11 release 6, and related files. There are also
symbolic links to subdirectories under X11R6.
- /usr/bin/X11->/usr/X11R6/bin
- /usr/lib/X11->/usr/X11R6/lib/X11
- /usr/include/X11->/usr/X11R6/include/X11
Configuration information should be in /etc/X11.
- X386
- X Window System, version 11 release 5, and related files. Details the
same as for /usr/X11R6.
- bin
- The primary directory for user commands.
- include
- Where all of the system's general-use include files for C/C++ should be
placed. There is a whole ream of subdirectories under here, but you only
need to worry about them if you are a programmer.
- lib
- /usr/lib is intended for object files and libraries. Historically it has
also contained compiler binaries and static data.
Miscellaneous application-specific static files and subdirectories should be
place in /usr/share, and application specific binaries in /usr/libexec (for
internal binaries), /usr/bin (for user commands), or /usr/sbin (for system
commands). However distributions may choose to place certain
application-specific static data in subdirectories under /usr/lib. (ie emacs,
mf, smail, uucp, etc).
- libexec
- /usr/libexec is intended for programs to be run by other programs, not by
users. It is directly drawn from the Net/2 distribution of BSD, the idea
being to remove executables non intended for execution directly be users from
the standard execution path.
- local
- /usr/local is for use by the sysop when installing software locally. It
will be empty after first installing a FHS compliant system. The intention
being to allow upgrading of the system without overwriting local software
installations. It is vary similar to /opt except that it is not normally
shareable.
- sbin
- Contains any non-essential binaries used exclusively by the system
administrator. See the discussion of /usr/bin, /bin and /sbin.
- share
- Another extensive directory hierarchy. Important subdirectories to note:
- dict
- doc
- info
- man
- terminfo
- zoneinfo
See the standard for a specific description of each of these, and the other
subdirectories under /usr/share.
/usr/share is for architecture independent data. Also note that the
/usr/share/man directory hierarchy is very extensive, although on most
machines it can be simplified to the common man/man{1,2,3,...}.
- src
- Non-local source code. /usr/src/linux should be a symbolic link to the
current kernel source tree. The exact layout of this directory is
architecture dependent.
<<<
Contents
>>>
Andrae Muys
Version: $Id: usr.html,v 2.2 2000/01/06 13:21:13 clinton Exp $