Filesystem Hierarchy Standard (FHS)
■ Defines how files and directories are organized in Linux
■ Provides standard directory names and use cases
■ Ensures consistency across FHS-compliant Linux distributions
■ Structures the filesystem like a tree, beginning with the root directory
/boot
■ Stores files needed to start the operating system
■ Includes
● /boot/initrd.img
● /boot/vmlinuz
● /boot/grub/grub.cfg
■ Initializes hardware and loads the operating system
■ Improper changes can prevent system from booting/bin
■ Contains executable programs required for basic system functionality
■ Used by all users
■ Examples
● /bin/ls
● /bin/cp
● /bin/mv
● /bin/cat
/sbin
■ Contains administrative commands used by the root user
■ Supports system-level modifications and tasks
■ Examples
● /sbin/fsck
● /sbin/reboot
● /sbin/iptables
● /sbin/mount
/lib – Shared Libraries and Kernel Modules
■ Contains essential shared libraries for programs in /bin and /sbin
■ Examples
● /lib/libc.so.6
● /lib/ld-linux.so.2
/dev
■ Contains special files representing hardware devices
■ Allows programs to interact with hardware as files
■ Examples
● /dev/sda
● /dev/tty1
● /dev/null
● /dev/random
/proc – Process and System Information
■ Virtual filesystem providing real-time system and process information
■ Dynamically generated files
■ Examples
● /proc/cpuinfo
● /proc/meminfo
● /proc/uptime
● /proc/[PID]/
/etc
■ Stores system-wide configuration files
■ Used to control system behavior and application settings
■ Examples ● /etc/passwd ● /etc/shadow ● /etc/hosts ● /etc/fstab ● /etc/ssh/sshd_config