Courseiva

LFCS Operation of Running Systems Practice Question

A server is running out of disk space. Which command will show the disk usage of the root filesystem in a human-readable format?

⚠ Common exam trap

Test-takers frequently confuse `du` (directory usage) with `df` (filesystem usage), often picking `du -sh /` because it shows a large number, but they fail to realize it does not report filesystem capacity or available space, which is what the question explicitly asks for.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

df -h /

The `df -h /` command displays disk usage for the root filesystem (`/`) in a human-readable format (e.g., GB, MB) by using the `-h` flag. This is the standard tool for checking filesystem-level disk space, not directory-level usage.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    ls -lh /

    Why it's wrong here

    ls -lh lists directory entry sizes, not filesystem blocks consumed, so it cannot report root filesystem usage. It is tempting because it shows human-readable sizes, and it would be correct for inspecting individual file sizes within a directory rather than overall filesystem consumption.

  • ✓

    df -h /

    Why this is correct

    The -h flag converts raw block counts into human-readable units such as G and M, while the / argument restricts output to the root filesystem alone, directly satisfying the scenario's need to identify space consumption there.

  • ✗

    fdisk -l /

    Why it's wrong here

    fdisk reports partition tables and geometry, not filesystem consumption, so it cannot reveal how full the root filesystem is. It is tempting because it lists disk devices, and it would be the right tool for inspecting or altering partition layout, not for measuring used space.

  • ✗

    du -sh /

    Why it's wrong here

    du -sh / totals apparent file sizes under root, omitting reserved blocks, deleted-but-open files and other filesystems mounted beneath it, so it misstates filesystem usage. It is tempting as a human-readable size summary, and would suit measuring a directory tree's footprint, not filesystem capacity.

About these practice questions

One of 406 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.