2.2 Filesystem Hierarchy Standard (FHS) & Core System Layout
Key Takeaways
The Filesystem Hierarchy Standard groups files by their purpose, including host configuration in
/etc, changeable data in/var, and kernel and process interfaces under/proc.Merged-
/usrlayouts such as Debian 12 retain traditional paths through symlinks. Inspect those links before assuming paths identify separate copies.x86-64 and AMD64 identify the same 64-bit architecture family. Arm’s AArch64 is commonly labeled
arm64in distribution packages.A display manager starts a graphical session. X11 uses an X server, while a Wayland compositor provides the display protocol and combines application surfaces.
Copyleft and permissive licenses both grant rights under their terms. Check the applicable distribution and notice requirements before redistributing software.
2.2 Filesystem Hierarchy Standard & Linux Platform Choices
The Filesystem Hierarchy Standard (FHS) defines common locations for system files. The same path can be present on many distributions even when the underlying package layout differs. Check which filesystem, package family and CPU architecture a task assumes.
The directory layout
The FHS separates files by whether several machines may share them and whether they change during operation. Host-specific configuration belongs in /etc. Shareable installation data can live under /usr. Runtime and application data that changes, such as logs and spools, typically belongs under /var. These categories also help plan backups and decompose a writable filesystem that is filling up.
| Directory | Purpose |
|---|---|
/ | Root of the mounted directory tree. Other filesystems attach below it. |
/bin and /sbin | Traditional locations for essential commands and system administration commands. On merged-/usr systems they can be symlinks. |
/boot | Static bootloader files, often including kernel and early boot images. |
/dev | Device nodes and special interfaces such as /dev/null. |
/etc | Host-specific system configuration. |
/home and /root | Conventional locations for ordinary user homes and the root user’s home, respectively. |
/lib | Traditional location of essential shared libraries and kernel modules. Check how the installed release lays it out. |
/proc | Pseudo-filesystem for kernel and process information. |
/sys | Kernel device and subsystem interfaces exposed through sysfs. |
/usr | Distribution-managed commands, libraries and other shareable operating-system data. |
/var | Variable data, including logs, application state and spools. |
/tmp and /var/tmp | Short-lived temporary files and temporary files expected to persist across reboots, respectively. Local cleanup policies can still apply. |
/mnt and /media | Temporary mount point for an administrator and mount locations for removable media, respectively. |
/opt | Add-on application packages under the FHS. |
Merged /usr in practice
In Debian 12, for example, the merged-/usr layout exposes traditional paths such as /bin via symbolic links to counterparts under /usr. A program invoked as /bin/cat can therefore resolve to /usr/bin/cat. Use ls -ld /bin /usr/bin to inspect the directory entries and readlink -f /bin/cat to resolve the program’s path. The result helps distinguish a compatibility path from a missing program. Do not assume that two pathnames necessarily refer to two installed copies.
Architecture and distributions
Common exam architecture names describe instruction sets. x86 in a contrast with x86-64 typically denotes 32-bit x86. x86-64 and AMD64 denote the 64-bit extension of x86. AArch64 is Arm’s 64-bit execution architecture and is commonly labeled arm64 in package metadata. RISC-V is an open instruction set architecture with 32-bit and 64-bit variants. A binary built for one of these architectures needs an appropriate environment. If an executable fails immediately with a format error, compare the machine reported by uname -m with the binary type reported by file.
A distribution packages the kernel, userspace, and tools with release and update policies. Red Hat-family systems use RPM packages, while Debian and Ubuntu use Debian packages managed at the low level by dpkg. These names do not identify every installed tool. Inspect /etc/os-release and the package system before following installation instructions.
Graphical sessions
A display manager offers a graphical login and starts the chosen session. A window manager positions windows and handles focus and related interactions. Under X11, the X server provides the display and input interface to client applications, and a window manager typically runs as a client. Under Wayland, a compositor serves the Wayland protocol and manages the combined display output and input routing. It usually provides window management as well. A display manager may launch either kind of session.
A graphical login screen that appears but returns immediately after sign-in points you toward the session or desktop logs. A missing graphical login screen instead gives you a reason to check whether the display manager started before debugging individual applications.
Licensing concepts
Free software concerns freedom to use, study, modify and redistribute a program. Open-source licenses grant access to source under terms that allow modification and redistribution. Copyleft licenses apply reciprocal conditions when covered works are distributed. Permissive licenses such as MIT generally allow reuse without requiring the larger program to adopt that license, while retaining applicable notice requirements. Proprietary software is governed by its license and can limit modification or redistribution even if it is free of charge. The Linux kernel is distributed under GPL-2.0-only overall, with documented rules and exceptions for certain files or interfaces.
Which FHS directory is designated for the administrator to temporarily mount a filesystem?
/opt
/mnt
/var/tmp
/run
The login screen starts a Wayland desktop. Which component provides the display protocol to clients and combines their surfaces for the display?
The package manager
The kernel bootloader
The Wayland compositor
The display manager’s authentication prompt
A lab downloads an x86-64 executable for a native AArch64 Linux guest without an emulator. Which operation helps confirm the likely mismatch?
Compare uname -m with file ./program
Compare df -h with lsblk
Compare id -u with id -g
Compare systemctl get-default with uptime
Sections you finish are checked off in the contents.