Linux Boot Files and the Merged /usr Layout
What you need to know
Linux distributions do not all place programs in exactly the same directories. Modern systems often use a merged /usr layout, where historical command and library paths are aliases through symbolic links. /boot is different: it is associated with starting the system.
How the layout works
Historically /bin held essential commands, /sbin held system administration commands and /lib held libraries needed by those programs. In Debian’s merged layout these names are symbolic links to /usr/bin, /usr/sbin and /usr/lib. Other distributions may merge administrative and ordinary command directories differently or still use separate directories. /lib variants depend on architecture. Two paths resolving to the same executable do not imply two installed copies.
/boot often contains bootloader-related files and kernel images; an initramfs is an initial filesystem image used during early boot. Some systems store boot files on separate partitions, including an EFI system partition mounted at a distribution-dependent location. A container may have an empty /boot because it does not boot its own kernel.
Before practicing
Use a normal user in your disposable Linux lab with Bash, GNU Coreutils and util-linux. These examples inspect specific paths only; no sudo is needed. If a directory, command or permission is missing, record the difference and stop rather than changing the system. Ubuntu 24.04 LTS is the teaching baseline; the recorded local outputs are from Debian 13.3 in a container.
Inspect traditional directories
On Debian with merged /usr, the lines begin with l and display targets such as usr/bin. A line beginning with d indicates a directory rather than a symbolic link. Metadata and layout vary.
Compare resolved command paths
On the selected Debian lab both print /usr/bin/ls. On another layout they may differ, or one command path may be absent. realpath resolves the path; it is not a check that a program is safe.
The traditional and modern names can lead to the same executable through a symbolic link. A script using one name may therefore work without a duplicate executable being installed. If either path is missing or resolves differently, use the actual distribution documentation rather than creating a compatibility link yourself.
Inspect boot directory presence
ls -ld /bootfindmnt -n -o TARGET,FSTYPE --target /bootThe first line reports the directory entry, the second the mount containing it. A root mount result does not prove that the system can boot or that boot files are present.
Common mistakes
Do not delete /bin because it points into /usr, or copy programs there to fix a missing command. Removing a compatibility link can break scripts. Do not edit or remove /boot files for this lesson. Boot repair requires a separate controlled recovery lab.
Try it yourself
Use ls -ld /bin /sbin to identify whether these paths are links in your lab. Explain why an empty /boot inside a container does not establish a broken host boot configuration.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Boot and merged usr layout — Knowledge Check
Apply Linux filesystem layout concepts and interpret safe inspection results.
What is the usual Debian merged-/usr target of /bin?
Two realpath commands for /bin/ls and /usr/bin/ls return the same path. What does this show?
What does the leading `l` in a typical `ls -ld /bin` output mean?
What commonly belongs under /boot?
A container has an empty /boot. What is the correct conclusion?