What you will learn
- Read disk usage
- Mount and unmount filesystems
- Diagnose full disks
New to this? Start here
The basics, in plain English
Your data is physically stored on drives (the disk). This lesson is about seeing how much space is used, how a drive gets connected to a folder so you can use it, and why a full disk causes outages.
- Disk / drive
- The physical storage hardware where files actually live.
- Partition
- A slice of a disk treated as if it were its own separate drive.
- Filesystem
- The format that organizes a partition into folders and files so software can use it.
- Mount
- Attaching a drive or partition to a folder so its contents appear there and you can open them.
- df / du
- Commands that report disk space: df shows free space, du shows how big folders are.
01
Block to mount
lsblk shows block devices, df shows mounted filesystem usage, du measures directory size. A full / disk is a classic outage cause.
Try it yourself
bash
$df -h↳Show free and used disk space per filesystem, human-readable.$du -sh /var/* | sort -h↳Measure folder sizes under /var and sort smallest to largest.$lsblk↳List block devices and partitions as a tree.$mount /dev/sdb1 /mnt/data↳Attach a partition to a folder so you can use it.↳ lines explain what each command does — only the commands get copied
Finished this topic?
Mark it done to earn 100 XP and keep your streak alive.