Linux Directory Structure
Linux directory structure is not very complex but is different from the directory structure one comes across in other operating systems. The structure is so built that the different kinds of files with varied functions are effectively segregated into specific directories. The root partition and the root directory form the base of the Linux directory structure. Under the root directory, there are several directories that contain files meant for use for a particular purpose. System files are separated from the user files, so are the command and device files. Here is a detailed look at the various directories and the premise of their existence.
1. / or root directory
The root directory forms the base of Linux directory structure. Every other directory in the system comes under this directory.
This folder contains binary executable files relating to commands that can be used on the operating system. Each binary file represents a command or the system shell.
Boot loader files, the ones that are active at the time of the booting of system, are stored in this directory. Grub, initrd and kernel are a part of this directory.
This directory contains device files. Each device including the read & write devices connected with a system are represented as a device file.
System and network configuration files along with application configuration files are stored under this directory.
The home directories of all users are stored in this directory. This does not have the root home directory though.
The binary files stored in the system under the /bin directory have a lot of library files associated with them which are stored under this directory.
The removable media such as USBs and CD ROMs get a mount point on the system through this directory.
This directory too serves as a mount point for files that are temporarily associated with the system.
Optional software packages in Unix systems find storage space under this directory.
This directory contains binary files but differs from the /bin directory because it contains the files associated with system administration and maintenance.
Temporary files in the system, whether generated by the user or the system, are stored in this directory. As the name suggests, the content is temporary in nature and is lost once you shut down the system.
User programs and the associated data are stored in this directory. It holds binary files under a subdirectory. The documentation and library files associated with the source code for user programs are also placed here.
Files that contain data that is meant to change over a time are stored in this directory. This includes system log files and package files.
The service related data for servers associated with networks is stored under this directory.
The understanding of the directory structure and its organization helps people in gaining knowledge about the functioning of the Linux systems which are always considered more complex and difficult to handle as compared to other operating systems. The directory structure gives an idea of how well organized it is.