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.

35–45 min Week 3 · Productivity, storage, packages, networking Ubuntu terminal
Your outcome: Storage commands become tools for understanding, not danger.
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 folder

Shows 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 view

Shows root filesystem free space and type.

Run from ~/linux-practice

df -h /
df -hT /

Observe block devices

Read-only system view

Reads storage and mount information only.

Run from ~/linux-practice

lsblk
findmnt | head -20
mount | head -20

Put it into practice

  1. 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.

  1. Which command summarizes folder size?
  2. Which command shows filesystem free space?

Your practice, your pace

Loading saved progress…

Discussion

Continue the conversation about this guide. Loading comments connects to GitHub Discussions through giscus.

Open community discussions on GitHub

Check before you copy

This command needs care. Read its context, confirm the target and location, and keep a recovery path.

Copying does not run a command.