Typical Linux Directory Structure

The structure and a short explanation of it’s content.

  • /bin
    Contains various executable programs required to make the system usable – application binaries.
  • /boot
    Files required for the Linux boot process, such as vmlinuz – the Linux kernel file.
  • /dev
    Device files required for interfacing with hardware – device drivers.
  • /etc
    Configuration files for various programs are stored here.
  • /home
    User account directories. Each user created will have a subdirectory under /home with the name of the account. This is the default Linux behaviour.
  • /lib
    Shared libraries files that are necessary to boot the system as well as containing files required by various programs. It also contains modules (located in /lib/modules) which can be loaded into the kernel.
  • /lost+found
    Used to store restored files after a filesystem check. If data appears to have been lost mysteriously, it is a good idea to check here.
  • /mnt
    Used for mounting temporary file systems. When mounting a CD-ROM for instance, the standard mount point location is /mnt/cdrom. Some system have /media directory for similar purposes.
  • /opt
    Random data that has no other logical location – optional software.
  • /proc
    Pseudo-filesystem (not really a filesystem) with information running processes and the kernel. There is a subdirectory for each active process. For example, if you are interested in CPU or memory info, just show the content of the “files” – cat /proc/cpuinfo or cat /proc/meminfo.
  • /root
    Home directory for the super user – root, usually filled with system administration files. Sometimes a symbolic link to the home directory.
  • /sbin
    System binaries – similar to /bin, but it contains programs that are essential to the system – system maintenance programs.
  • /selinux
    To be explained.
  • /srv
    Location of data files for a particular services (FTP, WWW, or CVS). Data for a specific user should go in the /home/ directory. Data files currently located in /var should move to /srv in future.
  • /sys
    To be explained.
  • /tmp
    Temporary storage space. Often cleaned out either at boot time or by a regular job process.
  • /usr
    User related sub-directories, but mostly used to store applications. When installing an application, the typical path to install would be /usr/local.
  • /var
    Files that change (vary) as the system runs, such as log and status files. Some directories located within /var include: /var/spool (files in the print queue), /var/log (logging information), /var/run (the process ID’s for each current process).

Directories found on some distributions, or simply mentioned somewhere.

  • /net
    To be explained.
  • /misc
    To be explained.
  • /media
    Mount point for removeable media.
  • /data
    Common location for shared data files.

More detailed information about Filesystem Hierarchy Standard can be found at the www.pathname.com.

Leave a Reply