Tuesday, February 3, 2026

File System Hierarchy (Linux)

 File System Hierarchy (Linux)


👉 The File System Hierarchy defines the directory structure and directory contents in Linux.
👉It organizes files logically so the operating system and users can easily find and manage data.
👉In Linux, everything is treated as a file, and all files are arranged in a tree structure starting from the root directory (/).

Root Directory /
Top-most directory in Linux
All other directories are created under /
Important Directories & Description

👉/bin – Binary Executables
Essential user commands
Example: ls, cp, mv, cat

👉/sbin – System Binaries
System administration commands
Example: reboot, shutdown, ifconfig

Mostly used by root user

👉/etc – Configuration Files
System-wide configuration files
Example:
👉/etc/passwd – user accounts
👉/etc/fstab – file system mounts

👉/home – User Home Directories
Personal directories for users
Example: /home/venu
Stores documents, downloads, settings

👉/root – Root User Home
Home directory for root
Different from /

👉/var – Variable Data
Frequently changing files
Example:
👉/var/log – log files
👉/var/spool – mail, print jobs

👉/tmp – Temporary Files
Temporary files created by applications
Cleared automatically on reboot

👉/usr – User Programs & Data
Installed software and libraries
Subdirectories:
👉/usr/bin – user commands
👉/usr/lib – libraries
👉/usr/share – documentation

👉/lib & /lib64 – Libraries
Shared libraries needed by /bin and /sbin
Kernel modules also stored here

👉/boot – Boot Loader Files
Files required to boot the system
Example:
vmlinuz
initramfs
grub

👉/dev – Device Files
Represents hardware devices as files
Example:
👉/dev/sda – hard disk
👉/dev/null

👉/proc – Process Information
Virtual filesystem
Provides system & process info
Example:
👉/proc/cpuinfo
👉/proc/meminfo

👉/sys – System Information
Interface to kernel and hardware
Used for device and driver info

👉/mnt – Temporary Mount Point
Used for temporarily mounting filesystems

👉/media – Removable Media
Mount point for USB, CD/DVD

👉/opt – Optional Software
Third-party applications

Example: /opt/oracle






No comments:

Post a Comment

𝗣𝗵𝗶𝘀𝗵𝗶𝗻𝗴 𝘃𝘀 𝗦𝗽𝗲𝗮𝗿 𝗣𝗵𝗶𝘀𝗵𝗶𝗻𝗴 𝘃𝘀 𝗪𝗵𝗮𝗹𝗶𝗻𝗴

𝗣𝗵𝗶𝘀𝗵𝗶𝗻𝗴 𝘃𝘀 𝗦𝗽𝗲𝗮𝗿 𝗣𝗵𝗶𝘀𝗵𝗶𝗻𝗴 𝘃𝘀 𝗪𝗵𝗮𝗹𝗶𝗻𝗴 — 𝗞𝗻𝗼𝘄 𝘁𝗵𝗲 𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝗰𝗲 Not all cyberattacks are create...