Chapter 5 · Hardware, Disks, Partitions, and Filesystems·v1.0.0·Updated 7/6/2026·~12 min
What's changed: Initial version (topic 1.05, subtopics 1.05.1–1.05.3)
5.3Creating, Managing, and Mounting Filesystems
Key points
Learn to make partitions usable: creating filesystems with mkfs (traits of ext4, XFS, VFAT, Btrfs, tmpfs), swap (mkswap, swapon/swapoff), mount/umount, boot-time mounts in /etc/fstab, identification by UUID and label, and /media.
A fresh partition is still "bare land". Only after you create (format) a filesystem and mount it somewhere in the directory tree can files live there. Unlike Windows drive letters, Linux joins everything into one tree.
5.3.1Creating filesystems
- Create with the mkfs family (
mkfs.ext4 /dev/sdb1,mkfs.xfs,mkfs.vfat;mkfs -t ext4is equivalent). Data is destroyed—double-check the target device. - Traits: ext4 (the general-purpose Linux standard, journaling; its predecessor ext3 is the same journaling family, with ext4 as the successor), XFS (large-scale, parallel workloads; RHEL default), VFAT (FAT—interoperable with Windows; USB sticks, the ESP), Btrfs (new generation with built-in snapshots), tmpfs (in-memory, vanishes on reboot).
- Swap: initialize with
mkswap /dev/sdb2, enable with swapon (disable with swapoff); check viaswapon --show.
Continue reading — free sign-up
You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.

