Skip to content

hierarchy

Database files for NIS, formerly known as the Sun Yellow Pages (YP).
/var/yp
Like /tmp, this directory holds temporary files stored for an unspecified duration.
/var/tmp
Spooled files for uucp(1) (optional).
/var/spool/uucp
Spooled files for the smail(1) mail delivery program.
/var/spool/smail
Spooled files for rwhod(8) (optional).
/var/spool/rwho
Spool directory for news (optional).
/var/spool/news
Queued outgoing mail (optional).
/var/spool/mqueue
Replaced by /var/mail.
/var/spool/mail
Spools for a specific printer (optional).
/var/spool/lpd/printer
Spooled files for printing (optional).
/var/spool/lpd
Spooled jobs for cron(8).
/var/spool/cron
Spooled jobs for at(1).
/var/spool/at
Spooled (or queued) files for various programs.
/var/spool
Run-time variable files, like files holding process identifiers (PIDs) and logged user information (utmp). Files in this directory are usually cleared when the system boots.
/var/run
Reserved for historical reasons.
/var/preserve
Reserved for historical reasons.
/var/msgs
Users' mailboxes. Replaces /var/spool/mail.
/var/mail
Variable data for /opt.
/var/opt
Miscellaneous log files.

/var/log
lock files contain a PID as a 10-byte ASCII decimal number, followed by a newline character.

Lock files are placed in this directory. The naming convention for device lock files is LCK.. where is the device's name in the filesystem. The format used is that of HDU UUCP lock files, that is,
/var/lock
Variable data for /usr/local.
/var/local
Packaging support files (optional).
/var/lib/<pkgtool>
State data for packages and subsystems (optional).
/var/lib/<package>
These directories must be used for all distribution packaging support.
/var/lib/<name>
Editor backup files and state (optional).
/var/lib/<editor>
X display manager variable data (optional).
/var/lib/xdm
Miscellaneous state data.
/var/lib/misc
State directory for hwclock (optional).
/var/lib/hwclock
Variable files containing color management information (optional).
/var/lib/color
Variable state information for programs.
/var/lib
Variable game data (optional).
/var/games
Reserved for historical reasons.
/var/cron
System crash dumps (optional).
/var/crash
These directories contain preformatted manual pages according to their man page section.(The use of preformatted manual pages is deprecated.)
/var/catman/cat[1-9] or /var/cache/man/cat[1-9]
Package specific cache data (optional).
/var/cache/<package>
WWW proxy or cache data (optional).
/var/cache/www
Locally formatted man pages (optional).
/var/cache/man
Locally generated fonts (optional).
/var/cache/fonts
Data cached for programs.
/var/cache
Reserved for historical reasons.
/var/backups
/var/adm
Process accounting logs (optional).
/var/account

```bash
/var   This directory contains files which may change in size, such as spool and log files.

This link is present only for compatibility reasons and shouldn't be used.

/usr/tmp
Kernel source

Some distributions put here the source for the default kernel they ship.
You should probably use another directory when building your own kernel.

/usr/src/linux

Source files

Included with some packages for reference purposes. Don't work here with your own projects, as files below /usr should be read-only except when installing software

/usr/src
Files for timezone information (optional).
/usr/share/zoneinfo
MathML DTD (optional).
/usr/share/xml/mathml
XHTML DTD (optional).
/usr/share/xml/xhtml
DocBook DTD (optional).
/usr/share/xml/docbook
Files for XML (optional).
/usr/share/xml
Troff macros that are not distributed with groff (optional).
/usr/share/tmac
The database for terminfo (optional).
/usr/share/terminfo
MathML DTD (optional).
/usr/share/sgml/mathtml
HTML DTD (optional).
/usr/share/sgml/html
TEI DTD (optional).
/usr/share/sgml/tei
DocBook DTD (optional).
/usr/share/sgml/docbook
Files for SGML (optional).
/usr/share/sgml
Postscript Printer Definition (PPD) files (optional).
/usr/share/ppd
The message catalogs for native language support go here (optional).
/usr/share/nls
Miscellaneous data that can be shared among different architectures of the same OS.
/usr/share/misc
Manual pages

These directories contain manual pages for the specific locale in source code form. Systems which use a unique language and code set for all manual pages may omit the substring.

/usr/share/man/<locale>/man[1-9]
Manual pages go here in subdirectories according to the man page sections.
/usr/share/man
Locale information goes here (optional).
/usr/share/locale
Info pages go here (optional).
/usr/share/info
Static data files for games in /usr/games (optional).
/usr/share/games
Documentation about installed programs (optional).
/usr/share/doc
List of English words (optional).
/usr/share/dict/words
Contains the word lists used by spell checkers (optional).
/usr/share/dict
Contains color management information, like International Color Consortium (ICC) Color profiles (optional).
/usr/share/color
/usr/man.```
This directory contains subdirectories with specific application data, that can be shared among different architectures of the same OS. Often one finds stuff here that used to live in /usr/doc or /usr/lib or
/usr/share
This directory contains program binaries for system administration which are not essential for the boot process, for mounting /usr, or for system repair.
/usr/sbin
Replaced by /usr/share/man.
/usr/man
Source code for locally installed software.
/usr/local/src
Local application data that can be shared among different architectures of the same OS.
/usr/local/share
Locally installed programs for system administration.
/usr/local/sbin
Man pages associated with locally installed programs.
/usr/local/man
Info pages associated with locally installed programs.
/usr/local/info
Header files for the local C compiler.
/usr/local/include
These directories are variants of /usr/local/lib on system which support more than one binary format requiring separate libraries (optional).
/usr/local/lib<qual>
Files associated with locally installed programs.
/usr/local/lib
Binaries for locally installed games.
/usr/local/games
Configuration files associated with locally installed programs.
/usr/local/etc
Local documentation.
/usr/local/doc
Binaries for programs local to the site.
/usr/local/bin
This is where programs which are local to the site typically go.
/usr/local
Files for uucp(1).
/usr/lib/uucp
Files for the GNU groff document formatting system.
/usr/lib/groff
contains executables and include files for the GNU C compiler, gcc(1).
/usr/lib/gcc-lib
/usr/lib/X11
/usr/lib<qual>
Directory contains binaries for internal use only and they are not meant to be executed directly by users shell or scripts.
/usr/libexec
Object libraries, including dynamic libraries, plus some executables which usually are not invoked directly. More complicated programs may have whole subdirectories there.
/usr/lib
Include files to use with the GNU C++ compiler.
/usr/include/g++
nel version, provided in the libc*-dev package.)```
the libc you are using. It is very likely that things will break if you let /usr/include/asm and /usr/include/linux point at a random kernel tree. Debian systems don't do this and use headers from a known good ker‐```
(Note that one should have include files there that work correctly with the current libc and in user space. However, Linux kernel source is not designed to be used with user programs and does not know anything about
#### This contains information which may change from system release to system release and used to be a symbolic link to /usr/src/linux/include/linux to get at operating-system-specific information.
```bash
/usr/include/linux
/usr/include/asm
/usr/include/X11
BSD compatibility include files (optional).
/usr/include/bsd
Include files for the C compiler.
/usr/include
Binaries for games and educational programs (optional).

/usr/games
point to the appropriate files in /usr/etc.

Site-wide

Configuration files to be shared between several machines may be stored in this directory. However, commands should always reference those files using the /etc directory.
Links from files in /etc should

/usr/etc
Replaced by /usr/share/doc.
/usr/doc
Replaced by /usr/share/dict.
/usr/dict
/usr/bin/X11
Commands for the MH mail handling system (optional).
/usr/bin/mh
``````
#### This is the primary directory for executable programs.  Most programs executed by normal users which are not needed for booting or for repairing the system and which are not installed locally should be placed in this
```bash
/usr/bin
/usr/X11R6/include/X11
/usr/X11R6/lib/X11
Data files associated with the X-Window system.
/usr/X11R6/lib
/usr/X11R6/bin
The X-Window system, version 11 release 6 (present in FHS 2.3, removed in FHS 3.0).
/usr/X11R6

This directory is usually mounted from a separate partition.
It should hold only shareable, read-only data, so that it can be mounted by various machines running Linux.

/usr  

This directory contains temporary files which may be deleted with no notice, such as by a regular job or at system boot up.

/tmp   

This is a mount point for the sysfs filesystem, which provides information about the kernel like /proc, but better structured, following the formalism of kobject infrastructure.

/sys   

This directory contains site-specific data that is served by this system.

/srv   

Like /bin, this directory holds commands needed to boot the system, but which are usually not executed by normal users.

/sbin  

This directory contains information which describes the system since it was booted.
Once this purpose was served by /var/run and programs may continue to use it.

/run   

This directory is usually the home directory for the root user (optional).

/root  

This is a mount point for the proc filesystem, which provides information about running processes and the kernel.
This pseudo-filesystem is described in more detail in proc(5).

/proc  

This directory should contain add-on packages that contain static files.

/opt   

This directory is a mount point for a temporarily mounted filesystem.
In some distributions, /mnt contains subdirectories intended to be sed as mount points for several temporary filesystems.

/mnt   
USB drive (optional).
/media/usb[1-9]
Zip drive (optional).
/media/zip[1-9]
CD writer (optional).
/media/cdrecorder[1-9]
CD-ROM drive (optional).
/media/cdrom[1-9]
Floppy drive (optional).
/media/floppy[1-9]
appending a digit to the name of those available above starting with '0', but the unqualified name must also exist.
/media This directory contains mount points for removable media such as CD and DVD disks or USB sticks. On systems where more than one device exists for mounting a certain type of media, mount directories can be created by
This directory contains items lost in the filesystem. These items are usually chunks of files mangled as a consequence of a faulty disk or a system crash.
/lost+found
Loadable kernel modules (optional).
/lib/modules
These directories are variants of /lib on system which support more than one binary format requiring separate libraries (optional).
/lib<qual>

```bash
/lib   This directory should hold those shared libraries that are necessary to boot the system and to run the commands in the root filesystem.

```bash
/home  On machines with home directories for users, these are usually beneath this directory, directly or not.  The structure of this directory depends on local administration decisions (optional).
This directory contains the configuration files for XML (optional).
/etc/xml
Configuration files for the X11 window system (optional).
/etc/X11
When a new user account is created, files from this directory are usually copied into the user's home directory.
/etc/skel
This directory contains the configuration files for SGML (optional).
/etc/sgml
Host-specific configuration files for add-on applications installed in /opt.
/etc/opt

  • Comments are closed on this article!

Last update: December 4, 2022 19:31:07