Mission 21 of 30
Disk Usage and Storage Info
Find what consumes space in the practice workspace.
Measure your practice folder and safely observe Ubuntu storage information.
Your outcome: Storage commands become tools for understanding, not danger.
Practice inside
Practice inside
~/linux-practice. Check your setup before you begin.
Prerequisite: Archiving and Compression
.
What you’ll practice
- Use du for folder size
- Use df for filesystem free space
- Observe devices read-only
The mental model
- du measures file/folder usage.
- df reports filesystem free space.
- lsblk and findmnt observe storage layout; they do not format anything.
Try it in your terminal
Measure sandbox
Safe in practice folderShows size of the practice folder and its contents.
Run from ~/linux-practice
cd ~/linux-practice
du -sh
du -sh * 2>/dev/null Filesystem free space
Read-only system viewShows root filesystem free space and type.
Run from ~/linux-practice
df -h /
df -hT / Observe block devices
Read-only system viewReads storage and mount information only.
Run from ~/linux-practice
lsblk
findmnt | head -20
mount | head -20 Put it into practice
- Find the largest top-level item in ~/linux-practice with du -sh *.
Check your result
du identifies the largest practice item and df reports capacity.
Common mistakes
- You see `lsblk` in a tutorial and assume it's dangerous because it mentions disks. It's read-only. It shows you what disks exist and how they're partitioned. The dangerous tools are `mkfs`, `dd`, and `fdisk` — those change things. lsblk just looks.
Check your understanding
Explain these in your own words. If you’re unsure, revisit the examples before moving on.
- Which command summarizes folder size?
- Which command shows filesystem free space?
Your practice, your pace
Loading saved progress…