Linux directory Structure
This section provide the knowledge of directory structure of Linux.
If you are well acquainted with the directories of windows,
then you will learn easily the directory structure of Linux by comparisons.
In the Linux operating system, all file systems are contained within one directory
hierarchy. The root /
directory is the top level directory, and all its subdirectories make up
the directory hierarchy. It is like a tree structure.
The directories bin, sbin, lib, usr, var, boot, dev, etc, home, mnt, proc, root, tmp, lost+found, opt, as shown in figure below
Linux Directory Structure
The Linux File system Hierarchy
Directories structure of Linux listed below.
The root is the top directory in the Linux file system. It is denoted by /
. (forward slash)
It is equivalent to the system drive (C:\ ) in Windows.
In Linux, this is the directory containing the kernel,
the core of the operating system. Also in this directory are files
related to booting the system, such as the bootloader (vmlinuz).
directory contains executable (binary files) programs such as ls
This directory contains files with information about devices, either
hardware or software devices, on the system. devices can include the floppy drive, CD-ROM drive and hard disk.
directory contains configuration files which are local to the machine.
directory contains user account directories. Each user created by the system administrator will have a subdirectory under /home with the name of the account.
E.g. User account for mohit is created, his home directory will be located in /home/mohit.
All her personal files will reside in this directory.
This directory is synonymous with "C:\Documents and Settings\" in Windows XP/200x or "C:\Users\" in the Vista and Windows Server 2008 world.
libraries files that are required to boot the system as well as containing files required by various programs such as chdir and mv.
Each partition has its own lost+found directory. This directory is used to find out lost data from the corresponding partition.
directory used for mounting temporary file systems. When you insert the disc into CD-ROM the
standard mount point location is /mnt/cdrom.
directory provides information about running processes and the kernel.
The following commands
will give you this information:
$ cat /proc/cpuinfo - Display CPU information of system.
$ cat /proc/meminfo - Display RAM information as well as swap space capacity and
directory is the home directory for the super user (root).
This directory similar to /bin
, this directory contains executable programs needed to boot the system.
This directory mostly contain administrative tools, that should be made available only to the root.
This is the directory where temporary files are placed. This is similar to the C:\Temp directory under Windows.
The directory structure within /usr
appears similar to the root directory structure.
Some directories located within /usr include:
- /usr/doc - Documentation relating to the installed software programs.
- /usr/bin - Executable programs that are not required for booting or repairing the system.
Files in /var are dynamic
contains data that is changed when the system is running normally.
used for storing random data that has no other logical destination.