Linux Directory Structure


Everything in Linux can be reduced to a file. Partitions are associated with files such as /dev/hda1. Hardware components are associated with files such as /dev/modem. The Filesystem Hierarchy Standard (FHS) is the official way to organize files in Unix and Linux directories.

Linux file system and directory structure

Several major directories are associated with all modern Unix/Linux operating systems. These directories organize user files, drivers, kernels, logs, programs, utilities, and more into different categories. The standardization of the FHS makes it easier for users of other Unix-based operating systems to understand the basics of Linux. All of the other directories shown in Table are subdirectories of the root directory, unless they are mounted separately.

The root directory, the top-level directory in the FHS. All other directories are subdirectories of root, which is always mounted on some partition. All directories that are not mounted on a separate partition are included in the root directory’s partition.
Essential command line utilities. Should not be mounted separately; otherwise, it could be difficult to get to these utilities when using a rescue disk.
Includes Linux startup files, including the Linux kernel. Can be small; 16MB is usually adequate for a typical modular kernel. If you use multiple kernels, such as for testing a kernel upgrade, increase the size of this partition accordingly.
Most basic configuration files.
Hardware and software device drivers for everything from floppy drives to terminals. Do not mount this directory on a separate partition.
Home directories for almost every user.
Program libraries for the kernel and various command line utilities. Do not mount this directory on a separate partition.
The mount point for removable media, including floppy drives, CD-ROMs, and Zip disks.
Applications such as WordPerfect or Star Office.
Currently running kernel-related processes, including device assignments such as IRQ ports, I/O addresses, and DMA channels.
The home directory of the root user.
System administration commands. Don't mount this directory separately.
Temporary files. By default, Red Hat Linux deletes all files in this directory periodically.
Small programs accessible to all users. Includes many system administration commands and utilities.
Variable data, including log files and printer spools.

No comments:

Post a Comment