from small one page howto to huge articles all in one place

search text in:

Which linux distribution do you use?

poll results

Last additions:
using iotop to find disk usage hogs

using iotop to find disk usage hogs






average rating: 1.7 (102 votes) (1=very good 6=terrible)

May 25th. 2007:




why adblockers are bad

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels

Workaround and fixes for the current Core Dump Handling vulnerability affected kernels






average rating: 1.4 (42 votes) (1=very good 6=terrible)

April, 26th. 2006:

Druckversion . pdf icon
You are here: System

Description of the file system hierarchy

A lot of linux(unix) beginners have trouble finding files in the filsystem hierarchy.

This article could be a help for that problem.

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 only
holds the files which are needed during the boot process. The
map installer and configuration files should go to /sbin and
/dev Special or device files, which refer to physical devices. See
/dos If both MS-DOS and Linux are run on one computer, this is a typ-
ical place to mount a DOS file system.
/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 and XML
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).
/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.
/lib This directory should hold those shared libraries that are nec-
essary to boot the system and to run the commands in the root
/mnt This directory contains mount points for temporarily mounted
/opt This directory should contain add-on packages that contain
static files.
/proc This is a mount point for the proc filesystem, which provides
information about running processes and the kernel. This
pseudo-file system 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.
/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).
Binaries which belong to the X-Windows system; often, there is a
symbolic link from the more traditional /usr/bin/X11 to here.
Data files associated with the X-Windows system.
These contain miscellaneous files needed to run X; Often, there
is a symbolic link from /usr/lib/X11 to this directory.
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.
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
in /usr/etc.
Binaries for games and educational programs (optional).
Include files for the C compiler.
Include files for the C compiler and the X-Windows 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
(Note that one should have include files there that work cor-
rectly 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 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 kernel version,
provided in the libc*-dev package.)
Include files to use with the GNU C++ compiler.
Object libraries, including dynamic libraries, plus some exe-
cutables which usually are not invoked directly. More compli-
cated programs may have whole subdirectories there.
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.
Local documentation.
Configuration files associated with locally installed programs.
Binaries for locally installed games.
Files associated with locally installed programs.
Header files for the local C compiler.
Info pages associated with locally installed programs.
Man pages associated with locally installed programs.
Locally installed programs for system administration.
Local application data that can be shared among different archi-
tectures of the same OS.
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.
Documentation about installed programs.
Static data files for games in /usr/games.
Info pages go here.
Locale information goes here.
Manpages 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 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 and XML.
The datebase for terminfo.

Troff macros that are not distributed with groff.

Files for timezone information.

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.

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.

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.

/var/catman/cat[1-9] or /var/cache/man/cat[1-9]
These directories contain preformatted manual pages according to
their man page section. (The use of preformatted manual pages is

Reserved for historical reasons.

Variable state information for programs.

Variable data for /usr/local.

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,
i.e. lock files contain a PID as a 10-byte ASCII decimal
number, followed by a newline character.

Miscellaneous log files.

Variable data for /opt.

Users' mailboxes. Replaces /var/spool/mail.

Reserved for historical reasons.

Reserved for historical reasons.

Run-time variable files, like files holding process identifiers
(PIDs) and logged user information (utmp). Files in this direc-
tory are usually cleared when the system boots.

Spooled (or queued) files for various programs.

Spooled jobs for at(1).

Spooled jobs for cron(1).

Spooled files for printing.

Replaced by /var/mail.

Queued outgoing mail.

Spool directory for news.

Spooled files for rwhod(8).

Spooled files for the smail(1) mail delivery program.

Spooled files for uucp(1).

Like /tmp, this directory holds temporary files stored for an
unspecified duration.

Database files for NIS.

The Filesystem Hierarchy Standard, Version 2.2

This list is not exhaustive; different systems may be configured

Taken from the manpage of hier ("man hier")

rate this article:
current rating: average rating: 1.3 (55 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)


Support us on Content Nation
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004-2020 Sascha Nitsch Unternehmensberatung GmbH
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 42.5 ms