This is an old revision of the document!

File System Hierarchy

General Information

Some of the most common top level directories in the Linux file system.


Top Level Directories

EL7 = Enterprise Linux 7 (Red Hat, CentOS, Scientific)

Directory Used For
/ Root directory; file system tree starts here
/bin Executable programs needed to repair system; essential during boot; EL7 symlinks /bin → /usr/bin
/boot All files needed to boot the Linux kernel
/dev Special/device files; refer to physical device
/etc “etcetera”; configuration files local to the system
/home User local home directories
/lib and /lib64 Shared libraries used by programs in /boot,/bin, /sbin; EL7 symlinks /lib → /usr/lib and /lib64 → /usr/lib64
/media and /mnt Mount points for removable media and temporary file systems respectively
/opt Add on or optional packages
/proc Pseudo-filesystem that provides information on running processes and the kernel
/root Home directory for the root user
/run Process/user specific info created since last boot
/sbin Similar to /bin, except for system administration not used by regular users; EL7 symlinks /sbin → /usr/sbin
/srv Directory to use for data used by services (such as NFS, FTP, HTTP)
/sys To interface with hardware devices managed by the kernel
/tmp Temporary files that could be deleted without warning during boot
/usr Directory containing sub directories with program files, libraries, and documentation. Typically mimics the contents of /. Not required during boot.
/var Files that can change dynamically (log files, mail, and spool files)

Common Directories with Own Partition

It is common to separate the following directories onto their own mount point/partition:

  • / ⇒ isolate the core OS away from the rest of the system.
  • /boot ⇒ isolate kernel boot images, cannot be LVM.
  • /home ⇒ in order to isolate user data from the rest of the system.
  • /tmp ⇒ isolate world writeable /tmp to give more secure mount options.
  • /var ⇒ isolate other variable data that could grow from affecting the rest of the system. (yum cache, common place for applications to write to)
  • /var/log ⇒ prevent run away log files from affecting the rest of the system.

  • linux_wiki/file_system_hierarchy.1447818792.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)