4.3a Where Programs and Configuration Live (FHS Basics)
Key Takeaways
- The Filesystem Hierarchy Standard (FHS) defines conventional locations so programs, configuration, and user data are predictable across Linux systems
- `/etc` holds system-wide configuration—usually plain text files that control how programs and services behave
- `/boot` stores bootloader files, the kernel image, and related early-boot artifacts needed before the root filesystem is fully in use
- Program binaries commonly live under paths such as `/bin`, `/sbin`, `/usr/bin`, and `/usr/sbin` (with `/opt` for some add-on packages)—distinct from user documents in `/home`
- For Essentials, remember the mental model: programs (executables) vs configuration (`/etc`) vs user data (`/home`) vs boot artifacts (`/boot`)—process and log details continue in 4.3b
Where Programs and Configuration Live (FHS Basics)
Objective 4.3 Where Data is Stored (weight 3) asks where information lives on a Linux system. This section—4.3a—focuses on programs, configuration, and the Filesystem Hierarchy Standard (FHS) mental model, especially /etc and /boot, contrasted with user data. Runtime views such as processes, /proc, logs, and memory tools continue in 4.3b.
Why a standard hierarchy matters
Unlike a single “Program Files” and “Users” layout unique to one vendor desktop, Linux distributions follow (with small variations) the FHS: a shared map of top-level directories. When you know that map, you can administer unfamiliar distros faster: configuration is where you expect, binaries are on the PATH, and user documents are not mixed into system directories.
Think in roles, not random folder names:
| Role | Typical locations | What belongs there |
|---|---|---|
| Programs (executables) | /bin, /sbin, /usr/bin, /usr/sbin, sometimes /opt/... | Commands and services the system runs |
| Libraries | /lib, /usr/lib (and multiarch variants) | Shared code programs link against |
| Configuration | /etc | System-wide settings (usually text) |
| Boot artifacts | /boot | Kernel, initramfs, bootloader configs/images |
| User data | /home/username, root’s /root | Documents, personal configs, downloads |
| Variable data | /var (logs, spools, caches—detail in 4.3b) | Data that grows and changes while the system runs |
| Temporary files | /tmp, /var/tmp | Short-lived scratch space |
You do not need every FHS footnote for Essentials, but you do need this role-based map.
Programs: binaries and scripts
A program is an executable: either a binary (machine code) or a script (text interpreted by a shell or language runtime). Essential command locations:
| Path | Traditional role |
|---|---|
/bin | Essential user commands needed for basic operation |
/sbin | Essential system administration commands |
/usr/bin | Majority of userland programs |
/usr/sbin | Additional administrative programs |
/opt | Optional or third-party software packages in their own trees |
On modern systems, /bin and /usr/bin are often merged (symlinks), but exam items still speak in classic FHS terms. When you type ls or passwd, the shell finds the executable via PATH, which usually includes these directories.
Contrast with user data: your essay draft in /home/alex/Documents/report.txt is not a system program. Deleting user files should not remove /usr/bin/python3. Conversely, upgrading a package replaces files under /usr, not your documents under /home.
Configuration: the /etc directory
/etc is the home of system-wide configuration. Historically a catch-all, it matured into the standard place for plain-text settings that control programs and services. Typical traits:
- Usually human-readable text (not opaque binary blobs)
- Edited by administrators (often as root) to change system behavior
- Read by programs at start or when reloaded
Examples you will meet across Essentials topics:
File (under /etc) | Purpose |
|---|---|
passwd, group, shadow | User and group databases (security topic) |
hostname | System hostname |
hosts | Static name-to-address mappings |
fstab | Filesystems to mount at boot |
ssh/sshd_config | SSH daemon settings (when OpenSSH is installed) |
| Network and resolver files | Interface and DNS configuration (Topic 4.4) |
Application-specific directories also live here (/etc/nginx/, /etc/apt/, and similar). Personal preferences for a single user more often live in dotfiles inside that user’s home directory (for example ~/.bashrc), not in /etc. Remember the split:
/etc— affects the whole machine (system-wide)/home/...— affects one user (user data and personal config)
If a service ignores your edit, confirm you changed the system file in /etc rather than a copy in your home folder—or vice versa when you only meant to change your own shell.
Boot files: the /boot directory
/boot holds files required in the early boot path: the Linux kernel image (often named like vmlinuz-...), initramfs/initrd archives, and bootloader related files (for example GRUB configuration or modules, depending on layout). Without a usable kernel and bootloader setup, the system never reaches the point where it can mount the rest of the filesystem tree and run programs from /usr.
Why separate /boot?
- Bootloaders may need a simple filesystem layout early on
- Administrators can keep kernels organized and remove old ones carefully
- Some setups place
/booton its own partition
Do not casually delete files in /boot to “free space” without knowing which kernel you are booting. That is a classic way to render a system unbootable. Contrast again: clearing old downloads in /home is usually safe; clearing kernels in /boot is not.
FHS mental model for Essentials (keep it simple)
Use this four-bucket checklist when a question asks “where is X stored?”
- Is it a setting that changes how a service or the OS behaves system-wide? → start in
/etc - Is it the kernel or bootloader material needed to start the machine? → look in
/boot - Is it a command or installed application binary? →
/bin,/sbin,/usr/bin,/usr/sbin, or/opt - Is it a person’s documents, projects, or personal dotfiles? →
/home(or/rootfor the root account’s home)
Later (4.3b) you will add buckets for processes (/proc), device nodes (/dev), and logs (/var/log). Those are still “where data is stored,” but they are runtime or variable data—not the same as program packages and static configuration.
Programs vs configuration vs user data (worked contrasts)
| Item | Category | Likely location |
|---|---|---|
/usr/bin/grep | Program | Binary directories under /usr |
/etc/ssh/sshd_config | Configuration | /etc |
/boot/vmlinuz-... | Boot/kernel | /boot |
/home/sam/notes.txt | User data | /home |
A custom app under /opt/myapp/bin/tool | Optional program | /opt |
Package managers (APT, DNF, Zypper, and others) install programs into FHS locations and drop default configs into /etc, sometimes as .dpkg-dist / .rpmnew style alternatives when you customized files—details vary by distro, but the directory roles stay consistent.
Exam and study tips
- Fill-in items love exact paths: type
/etc,/boot,/home, not vague words like “settings folder.” - If a stem says system-wide configuration, prefer
/etcover a path under/home. - If a stem says kernel image or bootloader, prefer
/boot. - Keep 4.3a and 4.3b mentally separated so you do not dump every answer into
/var/log.
Master the role table, and “where data is stored” stops feeling like trivia and becomes a navigable map of the Linux filesystem.
Which directory is the conventional location for system-wide configuration files on a Linux system?
Where would you most likely find the Linux kernel image and related early-boot files?
How should you classify /usr/bin/ls versus /home/jordan/report.pdf in the FHS mental model?