A typical Linux system has, among others, the following directories:
/ This is the root directory. This is where the whole tree
/bin This directory contains executable programs which are needed in
single user mode and to bring the system up or repair it.
/boot Contains static files for the boot loader. This directory holds
only the files which are needed during the boot process. The
map installer and configuration files should go to /sbin and
/etc. The operating system kernel (initrd for example) must be
located in either / or /boot.
/dev Special or device files, which refer to physical devices. See
/etc Contains configuration files which are local to the machine.
Some larger software packages, like X11, can have their own sub-
directories below /etc. Site-wide configuration files may be
placed here or in /usr/etc. Nevertheless, programs should
always look for these files in /etc and you may have links for
these files to /usr/etc.
Host-specific configuration files for add-on applications
installed in /opt.
This directory contains the configuration files for SGML
When a new user account is created, files from this directory
are usually copied into the user's home directory.
Configuration files for the X11 window system (optional).
This directory contains the configuration files for XML
/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).
/lib This directory should hold those shared libraries that are nec-
essary to boot the system and to run the commands in the root
These directories are variants of /lib on system which support
more than one binary format requiring separate libraries
device exists for mounting a certain type of media, mount direc-
tories can be created by appending a digit to the name of those
available above starting with '0', but the unqualified name must
Floppy drive (optional).
CD-ROM drive (optional).
CD writer (optional).
Zip drive (optional).
USB drive (optional).
/mnt This directory is a mount point for a temporarily mounted
filesystem. In some distributions, /mnt contains subdirectories
intended to be used as mount points for several temporary
/opt This directory should contain add-on packages that contain
/proc 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).
/root This directory is usually the home directory for the root user
/sbin Like /bin, this directory holds commands needed to boot the sys-
tem, but which are usually not executed by normal users.
/srv This directory contains site-specific data that is served by
/sys 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.
/tmp This directory contains temporary files which may be deleted
with no notice, such as by a regular job or at system boot up.
/usr This directory is usually mounted from a separate partition. It
should hold only sharable, read-only data, so that it can be
mounted by various machines running Linux.
The X-Window system, version 11 release 6 (optional).
Contains include files needed for compiling programs using the
X11 window system. Often, there is a symbolic link from
/usr/include/X11 to this directory.
This is the primary directory for executable programs. Most
programs executed by normal users which are not needed for boot-
ing or for repairing the system and which are not installed
locally should be placed in this directory.
Commands for the MH mail handling system (optional).
is the traditional place to look for X11 executables; on Linux,
it usually is a symbolic link to /usr/X11R6/bin.
Replaced by /usr/share/dict.
Replaced by /usr/share/doc.
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 point to the appropriate files
Binaries for games and educational programs (optional).
Include files for the C compiler.
BSD compatibility include files (optional).
Include files for the C compiler and the X-Window system. This
is usually a symbolic link to /usr/X11R6/include/X11.
Include files which declare some assembler functions. This used
to be a symbolic link to /usr/src/linux/include/asm.
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
Object libraries, including dynamic libraries, plus some exe-
cutables which usually are not invoked directly. More compli-
cated programs may have whole subdirectories there.
These directories are variants of /usr/lib on system which sup-
port more than one binary format requiring separate libraries,
except that the symbolic link /usr/lib<qual>/X11 is not required
The usual place for data files associated with X programs, and
configuration files for the X system itself. On Linux, it usu-
ally is a symbolic link to /usr/X11R6/lib/X11.
contains executables and include files for the GNU C compiler,
Files for the GNU groff document formatting system.
Files for uucp(1).
This is where programs which are local to the site typically go.
Binaries for programs local to the site.
Configuration files associated with locally installed programs.
Binaries for locally installed games.
Files associated with locally installed programs.
These directories are variants of /usr/local/lib on system which
support more than one binary format requiring separate libraries
Header files for the local C compiler.
Info pages associated with locally installed programs.
Source code for locally installed software.
Replaced by /usr/share/man.
This directory contains program binaries for system administra-
tion which are not essential for the boot process, for mounting
/usr, or for system repair.
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/man.
Contains the word lists used by spell checkers (optional).
List of English words (optional).
Documentation about installed programs (optional).
Static data files for games in /usr/games (optional).
Info pages go here (optional).
Locale information goes here (optional).
Manual pages go here in subdirectories according to the man page
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 <locale> substring.
Miscellaneous data that can be shared among different architec-
tures of the same OS.
The message catalogs for native language support go here
Files for SGML (optional).
The database for terminfo (optional).
Troff macros that are not distributed with groff (optional).
Files for XML (optional).
DocBook DTD (optional).
XHTML DTD (optional).
MathML DTD (optional).
Files for timezone information (optional).
Source files for different parts of the system, 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 (optional).
This was the traditional place for the kernel source. Some dis-
tributions put here the source for the default kernel they ship.
You should probably use another directory when building your own
Obsolete. This should be a link to /var/tmp. This link is
present only for compatibility reasons and shouldn't be used.
/var This directory contains files which may change in size, such as
spool and log files.
Process accounting logs (optional).
This directory is superseded by /var/log and should be a sym-
bolic link to /var/log.
Reserved for historical reasons.
Data cached for programs.
These directories contain preformatted manual pages according to
their man page section. (The use of preformatted manual pages
System crash dumps (optional).
Reserved for historical reasons.
Variable game data (optional).
Variable state information for programs.
State directory for hwclock (optional).
Miscellaneous state data.
X display manager variable data (optional).
Editor backup files and state (optional).
These directories must be used for all distribution packaging
State data for packages and subsystems (optional).
Packaging support files (optional).
Variable data for /usr/local.
Lock files are placed in this directory. The naming convention
for device lock files is LCK..<device> where <device> is the
device's name in the filesystem. The format used is that of HDU
UUCP lock files, that is, lock files contain a PID as a 10-byte
ASCII decimal number, followed by a newline character.
Miscellaneous log files.
Variable data for /opt.
tory are usually cleared when the system boots.
Spooled (or queued) files for various programs.
Spooled jobs for at(1).
Spooled jobs for cron(8).
Spooled files for printing (optional).
Spools for a specific printer (optional).
Replaced by /var/mail.
Queued outgoing mail (optional).
Spool directory for news (optional).
Spooled files for rwhod(8) (optional).
Spooled files for the smail(1) mail delivery program.
Spooled files for uucp(1) (optional).
Like /tmp, this directory holds temporary files stored for an
Database files for NIS, formerly known as the Sun Yellow Pages
The Filesystem Hierarchy Standard, Version 2.3 <http://www.pathname.com
This list is not exhaustive; different systems may be configured dif-
find(1), ln(1), proc(5), mount(8)
Man Pages Copyright Respective Owners. Site Copyright (C) 1994 - 2019
All Rights Reserved.