Menu
“Partitions and filesystems, checking and mounting them, permissions, links and where files live.”
Topic 104 is the storage half of LPIC-1 exam 101-500. It follows a disk from empty to useful: you split it into partitions, put filesystems on them, keep them healthy and attach them to the directory tree. Then it zooms in on the files themselves: who may read and change them, how one file can have several names, and where everything belongs on a Linux system.
Each byte matches one exam objective (104.4 was dropped from LPIC-1 version 5.0, so the numbering skips it).
You’ll learn:
- to create MBR and GPT partition tables with
fdisk,gdiskandparted, and filesystems withmkfsandmkswap, including Btrfs basics - to watch free space and inodes with
dfanddu, and check and repair ext and XFS filesystems - to mount and unmount by hand, at boot through
/etc/fstabor systemd mount units, and by label or UUID - to read and set permissions and owners, use SUID, SGID and the sticky bit, and choose a
umask - to create hard and symbolic links and tell them apart
- where files live according to the Filesystem Hierarchy Standard, and how to find them with
find,locate,whereis,whichandtype
You’ll need: a Linux machine or VM where you can use sudo. Partitioning, mkfs, fsck and mount need root, and you’ll want a spare disk to play with: a VM disk, or a file turned into a loop device (shown in the first byte). For permissions, links and finding files, a container is enough: docker run -it --rm debian or docker run -it --rm ubuntu. A container can’t create loop devices or mount filesystems unless you start it with --privileged.
- 1 Create partitions and filesystemsSplit a disk with MBR or GPT using fdisk, gdisk and parted, then put ext4, XFS, FAT, exFAT, Btrfs or swap on it.
- 2 Maintain the integrity of filesystemsWatch free space and inodes with df and du, check and repair ext and XFS filesystems, and tune them with tune2fs.
- 3 Control mounting and unmounting of filesystemsAttach filesystems by hand with mount, at boot with /etc/fstab or systemd units, by label or UUID, and let users mount USB sticks.
- 4 Manage file permissions and ownershipRead and set rwx permissions with chmod, change owners with chown and chgrp, use SUID, SGID and the sticky bit, and pick a umask.
- 5 Create and change hard and symbolic linksGive one file several names with hard links, point to it with symlinks, tell them apart, and know when to link instead of copy.
- 6 Find system files and place files in the correct locationThe Filesystem Hierarchy Standard: what lives where, where your own files belong, and how to find anything with find, locate, whereis, which and type.

Byte card
The whole topic on one card
- MBR: 4 primary partitions and 2 TiB. GPT: 128 partitions, huge disks, needed for UEFI.
- mkfs.TYPE makes a filesystem, mkswap makes swap. Check them unmounted with fsck or xfs_repair.
- Mount by UUID or LABEL in /etc/fstab: device, mount point, type, options, dump, pass.
- r=4 w=2 x=1. SUID 4, SGID 2, sticky 1. The umask takes bits away from 666 and 777.
- Hard links share an inode, symlinks store a path. /etc config, /var data, /usr/local yours.
Save it as a cheat sheet, or share it with someone who's learning this too.