Menu
The Linux Directory Structure

If you're familiar with the Windows operating system, then you understand what a hierarchical directory structure is. A hierarchical structure means that directories are organized in an inverted tree pattern. The top directory in the structure is called the root directory. The root directory contains subdirectories, A subdirectory may contain more subdirectories and files.

The main difference between the Windows operating system and Linux is that Linux does not use drive letters. Drive letters split a directory structure into different trees for each drive, Linux always has a single tree. Different storage devices may contain branches of the tree, but there is always a single tree under the root.

/The top of the directory structure. All files and directories appear under the root directory, even if they're stored on different physical or virtual devices.
/binCommand binaries (e.g., cat, ls, cp) that need to be available in single user mode; for all users.
/bootBoot loader files such as GRUB, LILO, SYSLINUX or Loadlin.
/devDevice files. Each device connected to a system are represented by a device file.
/etcThis directory holds everything that does not belong elsewhere (however, restricted to static configuration files and may not contain binaries).
/homeUsers home directories, (except the root user's home directory) containing saved files, personal settings, etc.
/libLibrary files for the binaries stored in /bin and /sbin.
/lost+foundOn the next boot after a system crash fsck will perform a filesystem check. Any corrupt files that it finds will be placed in this directory.
/mediaMount points for plugnplay removable media such as USBs and CD ROMs.
/mntMount point for manually mounted filesystems for the system administrator.
/optOptional software packages.
/procVirtual filesystem providing process and kernel information files.
/rootHome directory for the root user.
/runRun-time variable data: Information about the running system since last boot, e.g., currently logged-in users and running daemons.
/sbinBinary files associated with system administration and maintenance.
/srvData for services provided by this system, such as data and scripts for web servers and FTP servers.
/sysInformation about the devices connected to the computer.
/tmpTemporary files, whether generated by the user or the system. Often not preserved between system reboots.
/usrX Window System, the kernel source code with its header files, libraries for the binaries in /usr/bin/ and /usr/sbin/, include files.
/varFiles whose content is expected to continually change during normal operation of the system such as logs and spool files.

The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Linux operating systems. It is maintained by the Linux Foundation. Because all Linux distribution providers do no follow the FHS exactly, and because even with FHS compliant systems, not everyone agrees what should be contained in a specific folder, your system may contain other directories not listed here.


Learn more at amazon.com

More Windows Administration Information:
• What Is the Android Operating System?
• Set Up a Minimal Server on a Raspberry Pi
• The Death of Windows
• Ubuntu for Non-Geeks: A Pain-Free, Get-Things-Done Guide
• Ubuntu Quick Start
• Check Used Disk Space on Linux With du Command
• Tips for top: Monitoring CPU load on Linux
• Fedora 3 Modem Installation
• The Fedora 3 Linux File Structure
• What is Bash?