Last Updated : 06 Jun, 2025
The Linux File Hierarchy Structure or the Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix-like operating systems. It is maintained by the Linux Foundation.
At the top of every Linux file system is the root directory represented by a forward slash /
. It’s the base point, and no directory exists above it. If you look at the file system graphically, you’ll see all other directories branching from this root directory.
Only the root user has permission to modify contents inside this directory. Regular users cannot make changes here. For example, if you attempt to create a file in /
as a non-root user, you’ll encounter a "Permission Denied" error.
The /bin
directory contains essential commands and binaries needed by all users, including cp
, ls
, ssh
, and kill
. These commands are universally available across user types.
This directory stores all files required for booting the system. It includes the GRUB bootloader configuration and essential kernel files that are loaded during startup.
Device files in Linux are stored in the /dev
directory. These are special files that act as interfaces between hardware and software. Device files are of two types: block devices (e.g., hard drives) and character devices (e.g., microphones and speakers). Examples include /dev/sda1
for disk partitions.
Short for "Editable Text Configuration," /etc
contains configuration files for system applications, users, services, and tools or it contains the Host-specific system-wide configuration files. For example, user details like UID and local addresses are defined here.
Every non-root user has a personal directory inside /home
. For example, if your username is anshu
, your personal directory would be /home/anshu
. Each user can create, delete, or modify files only in their own home directory and cannot access others’ home directories.
Applications require shared libraries to run, which are stored in /lib
. These include dynamic libraries needed during runtime. For example, Apache server libraries are available here.
Devices like USBs, CDs, and pen drives are mounted under /media
. For example, when a CD-ROM is inserted (appeared in FHS-2.3), its details will appear here.
When external drives are connected, they are temporarily mounted in /mnt
. This is where their contents become accessible to the system.
Third-party software and packages not part of the default system installation are stored in /opt
. It includes their configuration and data files.
Essential system binaries, e.g.,
This directory holds administrative binaries like iptables,
firewall management tools, fsck, init, route etc. These binaries are primarily for system administrators and typically require root privileges to execute.
Site-specific data served by this system, such as data and scripts for web servers, data offered by FTP servers, and repositories for version control systems.
Programs create temporary files during execution, and these are stored in /tmp
. These files are deleted automatically after the program finishes or when the system is restarted.
Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
The /proc
directory provides detailed information about system processes. Each process is assigned a unique ID and represented as a directory inside /proc
. For example, /proc/meminfo
gives real-time data about memory usage including total, free, buffer, and cache statistics.
The Linux File System (FHS) to store everything like programs and settings to your personal files. It starts at the root folder (/
) and organizes files into special folders with specific jobs. Key folders include /home
for your personal files, /etc
for system settings, /bin
for essential commands, and /tmp
for temporary files. This organization keeps Linux systems tidy, secure, and consistent across different computers.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4