A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/linux-unix/linux-file-hierarchy-structure/ below:

Linux File Hierarchy Structure - GeeksforGeeks

Linux File Hierarchy Structure

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. 

linux-directory 1. / (Root): 

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.

root-linux-directory 2. /bin : 

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.

bin-linux-directory 3. /boot :

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. 

boot-linux-directory 4. /dev :

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.

dev-linux-directory
5. /etc :

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.

etc-linux-directory 6. /home :

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.

home-linux-directory home-linux-directory 7. /lib:

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.

lib-linux-directory 8. /media:

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.

media-linux-directory
9. /mnt :

When external drives are connected, they are temporarily mounted in /mnt. This is where their contents become accessible to the system.

mnt-linux-directory 10. /opt : 

Third-party software and packages not part of the default system installation are stored in /opt. It includes their configuration and data files.

opt-linux-directory. 11. /sbin : 

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.

sbin-linux-directory
12. /srv : 

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.

srv-linux-directory 13. /tmp : 

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.

tmp-linux-directory 14. /usr : 

Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications. 

usr_bin-linux-directory usr_sbin-linux-directory usr_lib-linux-dirctory usr_local-linux-directory usr_src-linux-directory 15. /proc:

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.

proc-linux-directory proc-linux-directory Conclusion

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