Linux directory System is a tree-like hierarchy of directory and files. At the base of the directory file system is the “/” directory, otherwise known as the “root”. Linux does not use drive A, B, C, D like DOS or windows file system. Linux Mount a partition to be a directory. The following table describe many of the most common Linux directory:

Directory Description
/The nameless base of the filesystem. All other directories, files, drives, and
devices are attached to this root. Commonly (but incorrectly) referred to as
the “slash” or “/” directory. The “/” is just a directory separator, not a
directory itself.
/binEssential command binaries (programs) are stored here (bash, ls, mount,
tar, etc.)
/bootStatic files of the boot loader.
/devDevice files. In Linux, hardware devices are acceessd just like other files, and
they are kept under this directory. Example: /dev/sda represent first HDD drive, /dev/sda2 represent second partition in First HDD
/etcHost-specific system configuration files.
/homeLocation of users’ personal home directories (e.g. /home/bestariweb)
/libEssential shared libraries and kernel modules.
/procProcess information pseudo-filesystem. An interface to kernel data structures.
/rootThe root (superuser) home directory.
/sbinEssential system binaries (fdisk, fsck, init, etc).
/tmpTemporary files. All users have permission to place temporary files here.
/usrThe base directory for most shareable, read-only data (programs, libraries,
documentation, and much more).
/usr/binMost user programs are kept here (cc, find, du, etc.)
/usr/local“Locally” installed files. This directory only really matters in environments
where files are stored on the network. Locally-installed files go in
/usr/local/bin, /usr/local/lib, etc.). Also often used for
software packages installed from source, or software not officially shipped
with the distribution.
/usr/srcProgram source code. E.g. The Linux Kernel, source RPMs, etc
/usr/shareArchitecture-independent data (icons, backgrounds, documentation, terminfo,
man pages, etc.).
/usr/sbinNon-vital system binaries (lpd, useradd, etc.)
/varVariable data: mail and printer spools, log files, lock files, etc.

Write A Comment