Do you know about Directory Structure of Linux? In this article, we discuss Linux Directory Structure. Linux file systems contain some directories. The Filesystem Hierarchy Standard (FHS) defines the structure of file systems in Unix/Linux, like operating systems. It is maintained by the Linux Foundation.
Linux is a complex system. It requires an efficient way to start, stop, maintain and reboot a system, unlike Windows. There is a well-defined configuration file, binaries, man pages, info files, etc. for every process in Linux.
Here we provide a list of the directory contains important information, required for booting to device drivers, configuration files, etc. Let’s start in brief with an example.
|/ – Root||Every single file and directory starts from the root directory.
|/bin – User Binaries||Contains binary executables.
||s, ls, ping, grep, cp|
|/sbin – System Binaries||Contains binary executables,Just like /bin
||iptables, reboot, fdisk, ifconfig, swapon|
|/etc – Configuration Files||Contains startup and shutdown shell scripts used to start/stop individual programs.
|/dev – Device Files||Contains device files.
|/var – Variable Files||The content of the files that are expected to grow can be found under this directory.
||system log files (/var/log)|
|/tmp – Temporary Files||Temporary files created by system and users.
|/usr – User Programs||Contains binaries, libraries, documentation, and source-code for second level programs.
||/usr/lib -contains libraries for /usr/bin|
|/home – Home Directories||store their personal files for all users
|/boot – Boot Loader Files||Contains bootloader related files.||vmlinuz-2.6.32-24-generic|
|/lib – System Libraries||Contains library files that support the binaries located under /bin and /sbin||libncurses.so.5.7|
|/opt – Optional add-on Applications||Contains add-on applications from individual vendors.||installed under either /opt/ or /opt/ sub-directory.|
|/mnt – Mount Directory||Temporary mount directory where sysadmins can mount filesystems|