The Linux Filesystem

2026-02-13T10:11:49-0500 | 721 words

I thought about writing solely on my homedir layout or about the XDG Directory Specification, but I want to zoom out further than user home ~ or /home/$USER with my battle scars from installing Alpine over an existing filesystem. Instead, I'm just parroting back my understanding of the Filesystem Hierarchy Standard, or the FHS, and how it applies to Linux.

/bin: Contains unix core utilities meant for all users (non-root and root), from GNU Coreutils, BusyBox, or something newer. These are the classic "CLI" commands to do with navigating and moving files and directories (cd, mv, rm, rmdir), text manipulation like sed and awk, and so on. My favorites are probably date and wc.

/boot: Static files for booting the kernel. May also contain the Linux kernel itself named something like vmlinuz-lts.

/dev: Every device inside/connected to the host, whether these are drive partitions, external storage, a webcam or a mic, etc.

/etc: System-wide configuration files. Oftentimes, you can cp the default configuration for many applications from here to /home/$USER/.config as a starting point.

/home: User home directories.

/lib: Shared libraries needed for boot and depended upon by /bin and /sbin.

/media: Mountpoints for removable media. For example, I always mount a 2TB hard drive for large media files just by adding it to /etc/fstab.

/mnt: Temporary mount point you'll never use once you've installed a Unix OS.

/opt: Honestly? Couldn't tell you personally, but this is where static files and binaries for additional software ends up sometimes. I think LibreOffice puts itself here for some reason.

/proc: Process information for the Linux kernel.

/root: Homedir for the root user, though tbh there is no reason to ever be in here unless you like... want to configure your text editor or shell for when you run sudo -su or similar.

/run: This is a dynamic directory that starts empty on boot and fills with runtime information for user services, mostly $APPLICATION.pid. Mine has process id's for tailscale, crond, sshd, dbus, elongind.

/sbin: System binaries, so commands that have to do with disks like mkfs.* and mkswap/swapon/swapoff, fdisk and fsck, et cetera.

/sys: System filesystem (yep) information. It has info about laptop power, device drivers, VMs, etc.

/srv: Yeah, I'm stumped. It's empty on both my Alpine and Debian systems.

/tmp: Temp! My friend. On my Alpine laptop, this is where currently running "user services" are stored, distinct from /run. /run contains services that start from boot while my /tmp stores mpd-mpris and tmux sessions launched in my Sway config.

/usr: Read-only data shared between users, including /usr/{bin,lib,sbin}. Mine also has /usr/x86_64-alpine-linux-musl, the C standard library.

/var: For variable files, so anything dynamic like caches and logs and /var/lock. What makes this different from /tmp? For some reason /var/lib includes user-installed things like Flatpak, Syncthing, and Tailscale.

Take what I say with a grain of salt. These are more or less my notes with the FHS open on the right while I looked at my / on the left1. What's relevant to how I interact with my system is:

This is all good to understand if you plan on writing programs for Linux, but the above bullet points are all you need to be a "power user" short of a programmer, and you come by using these filesystems while troubleshooting.


  1. By the way, I'm resisting installing a TUI file browser to see if I really need one at all. My go-to has been ranger (Python) for the longest time and I've tried yazi (Rust). I'm curious about rovr because I lurk around the Textual community, but like. ls serves me great. I'm just a coreutils fan.