Understanding FHS (Filesystem Hierarchy Standard) is key to working efficiently with Linux. Every directory has a clearly defined purpose, and knowing this structure saves hours of searching for configuration files, logs, and binaries. The FHS standard ensures consistency across distributions — whether you use Ubuntu, Fedora, or Arch, the basic structure remains the same.
Directories¶
- /bin, /sbin — essential system commands (ls, cp, mount). On modern distros, these are symlinks to /usr/bin
- /boot — kernel, initramfs, GRUB bootloader configuration
- /dev — devices as files (disks, terminals, /dev/null)
- /etc — all system configuration in text files
- /home — user home directories
- /opt — third-party software (e.g., Google Chrome, JetBrains IDEs)
- /proc, /sys — virtual filesystems for kernel interaction
- /tmp — temporary files, cleared on reboot
- /usr — user programs, libraries, documentation
- /var — variable data — logs, cache, spools, databases
Important Files¶
System configuration lives primarily in /etc. The most important files include /etc/hostname for the machine name, /etc/hosts for local DNS resolution, and /etc/fstab for automatic disk mounting at boot. User accounts are managed by /etc/passwd and /etc/shadow (passwords), while /etc/sudoers defines sudo permissions. Logs reside in /var/log — /var/log/syslog for system messages and /var/log/auth.log for authentication events.
/proc¶
The /proc virtual filesystem provides real-time system information directly from the kernel. The command cat /proc/cpuinfo shows CPU details, cat /proc/meminfo shows memory status, and cat /proc/loadavg shows current load. Every running process has its own directory at /proc/{PID}/ with information about memory, file descriptors, and command line arguments.
FHS = Efficiency¶
Knowing FHS enables you to quickly diagnose problems on any Linux server. For complete documentation, run man hier, which describes the purpose of each directory in detail.