Table of Contents
The Linux directory structure is a standardized layout for organizing files and directories on Linux systems. It is based on the Filesystem Hierarchy Standard (FHS), which defines the recommended placement of files and directories for system-wide consistency.
The Linux directory structure is organized around the root directory, represented by the forward slash (
/). All other files and directories reside within the root directory, forming a hierarchical tree structure.
These are the common top-level directories associated with the root directory:
|binary or executable programs.
|system configuration files.
|home directory. It is the default current directory.
|optional or third-party software.
|temporary space, typically cleared on reboot.
|User related programs.
Some other directories in the Linux system:
|It contains all the boot-related information files and folders such as conf, grub, etc.
|It is the location of the device files such as dev/sda1, dev/sda2, etc.
|It contains kernel modules and a shared library.
|It is used to find recovered bits of corrupted files.
|It contains subdirectories where removal media devices are inserted.
|It contains temporary mount directories for mounting the file system.
|It is a virtual and pseudo-file system to contains info about the running processes with a specific process ID or PID.
|It stores volatile runtime data.
|binary executable programs for an administrator.
|It contains server-specific and server-related files.
|It is a virtual file system for modern Linux distributions to store and allows modification of the devices connected to the system.
Exploring directories and their usability:
We know that Linux is a very complex system that requires an efficient way to start, stop, maintain and reboot a system, unlike Windows operating system. In the Linux system some well-defined configuration files, binaries, main pages information files are available for every process.
Linux Kernel File:
- /boot/vmlinux – The Linux kernel file.
- /dev/hda – Device file for the first IDE HDD.
- /dev/hdc – A pseudo-device that output garbage output is redirected to /dev/null.
System Configuration Files:
|It is used by bash shell that contains system defaults and aliases.
|A shell script to run specified commands on a predefined time interval.
|It contains information on the file system available on the network.
|Information of the Disk Drive and their mount point.
|It is a text file to define Information of Security Group.
|It is the grub bootloader configuration file.
|Service startup Script.
|It contains lilo bootloader configuration file.
|Information of IP and corresponding hostnames
|It contains a list of hosts allowed accessing services on the local machine.
|List of hosts denied accessing services on the local machine.
|INIT process and their interaction at the various run levels.
|Allows editing the pre-login message.
|It contains the configuration files for the system modules.
|It contains the message of the day.
|Currently mounted blocks information.
|It contains username, password of the system, users in a shadow file.
|It contains printer Information.
|Bash shell defaults.
|It contains other scripts like application scripts, executed after login.
|It avoids script duplication.
|Run Level Initialisation Script.
|DNS being used by System.
|It contains the name of terminals where root login is possible.
|Script that initiates new user home directory.
|An ASCII file that defines the behavior of different types of the terminal.
|Directory tree contains all the conf files for the X-window System.
User Related Files:
|User Related Files
|It contains most of the executable files.
|Symbolic link of /usr/bin.
|It contains standard files used by C program.
|It contains architecture independent shareable text files.
|It contains object files and libraries.
|It contains commands for Super User, for System Administration.
Virtual and Pseudo Process Related Files:
|Virtual and Pseudo Process Related Files
|It keeps useful info about the processes that are currently running.
|it keeps the information about the number of interrupts per IRQ.
|Contains all the Input and Output addresses used by devices on the server
|It reports the memory usage information.
|Currently using kernel module.
|Mounted File-system Information.
|It displays the detailed statistics of the current system.
|It contains swap file information.
Version Information File:
- /version – It displays the Linux version information.
|It stores user’s last login info.
|It has all the global system messages
|It keeps a history of login and logout information.