Interview Prep/Linux/Filesystem Hierarchy, Inodes & Links

Explain the purpose of the main top-level directories in the FHS.

BeginnerConceptFilesystem Hierarchy, Inodes & Links
Answer
  • /etc host-specific configuration
  • /var variable data: logs, spool, caches, databases (/var/log, /var/lib)
  • /usr read-only programs and libraries (/usr/bin, /usr/lib)
  • /opt self-contained third-party software
  • /home, /root user home directories
  • /tmp temporary files (often tmpfs, cleared on boot)
  • /dev device nodes, /proc and /sys kernel virtual filesystems
  • /run runtime state (PID files, sockets), tmpfs
All Linux questions Roadmap: Linux

More on Filesystem Hierarchy, Inodes & Links