Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using Linux for a couple of years now but I still haven't figured out what the origin or meaning of some the directory names are on Unix and Unix like systems. E.g. what does etc stand for or var? Where does the opt name come from?

And while we're on the topic anyway. Can someone give a clear explanation of what directory is best used for what. I sometimes get confused where certain software is installed or what the most appropriate directory is to install software into.

share|improve this question
up vote 38 down vote accepted

For more data on the layout of Linux file-systems, look at the Filesystem Hierarchy Standard (now at version 2.3, with the beta 3.0 version deployed on most recent distros). It does explain some of where the names came from:

  • /bin - Binaries.
  • /boot - Files required for booting.
  • /dev - Device files.
  • /etc - Etcctera. The name is inherited from the earliest Unixes, which is when it became the spot to put config-files.
  • /home - Where Home directories are kept.
  • /lib - Where code libraries are kept.
  • /media - A more modern directory, but where removable media gets mounted.
  • /mnt - Where temporary file-systems are mounted.
  • /opt - Where opttional add-on software is installed. This is discrete from /usr/local/ for reasons I'll get to later.
  • /run - Where runtime variable data is kept.
  • /sbin - Where super-binaries are stores. These usually only work with root.
  • /usr - Another directory inherited from the Unixes of old, it stands for "user". This directory should be sharable between hosts, and can be NFS mounted to multiple hosts safely. It can be mounted read-only safely.
  • /var - Another directory inherited from the Unixes of old, it stands for "variable". This is where system data that varies may be stored. Such things as spool and cache directories may be located here. If a program needs to write to the local file-system and isn't serving that data to someone directly, it'll go here.
  • /srv - Stands for "serve". This directory is intended for static files that are served out. /srv/http would be for static websites, /srv/ftp for an FTP server.

/opt vs /usr/local

The rule of thumb I've seen is best described as:

Use /usr/local for things that would normally go into /usr, or are overriding things that are already in /usr. Use /opt for things that install all in one directory, or are otherwise special.

share|improve this answer
The document answers the first half of my question very well. However, where the names are derived from is still a mystery. The reason I'd like to know is because I think it will give me more context. – Luke Jun 12 '09 at 9:31
The naming is nearly all self explanatory. Especially if you read through the descriptions in that link. – Dan Carley Jun 12 '09 at 9:35
No it isn't. It explains what 'etc' is used for but is doesn't explain where the name comes from or what it stands for. – Luke Jun 12 '09 at 21:18
@sysadmin1138, so /run is basically referencing the RAM? – Pacerier Dec 19 '14 at 5:59
@Pacerier It's a filesystem, but may be safely mounted as a RAM-disk. That said, many programs assume a set structure in there, so actually require persistence. – sysadmin1138 Dec 19 '14 at 12:37

Historically, /etc stands for "etcetera" and /var is short for "variable." I suppose the former is because a large collection of unrelated system configuration files go into /etc. The latter is because the files in /var are expected to change. You can often mount /usr and / as read-only (except when performing updates), but you can never mount /var read-only. It hold system logfiles, lock files, spool files, and other things that change dynamically.

Other people gave you pointers to help you figure out what best goes where.

share|improve this answer

Sorry to resurrect an old thread, but I feel this detail is an important clarification for all future seekers of this info:

  • /opt stands for optional (as in optional add-on packages).
  • /bin stands for binary (contains executables used by the OS).
  • /lib stands for library (contains shared libraries used by filesystem and for booting, probably used by the executables in bin)
  • /proc stands for processes.
  • /root means root user.
  • /home holds the home sub-directories for any non-root users.
  • /dev stands for device (holds special and device files).
  • /tmp stands for temporary.
  • /srv stands for serve.
  • /mnt stands for mount point (mount a temporary filesystem here).
  • /include contains #include files, i.e. header files (e.g., stdio.h).
  • /var stands for variable
  • /etc stands for etcetera
share|improve this answer
Nice answer: succinct, directed at the level of the question, and no need to look up other links. +1 – Scott Biggs Jul 28 '14 at 13:37

Try this:

$ man hier
share|improve this answer
Nice one. However, just like the document referred to in other answers, this man page only talks about what the directories are used for. I'm also interested in why certain names where chosen, like /etc e.g. – Luke Jun 23 '09 at 22:33
The answer to your question about /etc is here: – Anonymous Jun 24 '09 at 12:37

The best place to look for this is the Filesystem Hierarchy Standard (FHS). The latest version is 2.3 available at:

share|improve this answer

/usr actually means Unix System Resources


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.