easyMultiple Select
XK0-006 Practice Question: Which TWO commands can be used to check disk…
Which TWO commands can be used to check disk space usage on a Linux system?
⚠ Common exam trap
Many candidates confuse `du` and `df` with commands like `mount` or `fdisk`, which are related to filesystem management but do not directly report disk space usage.
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
✓
du
The `du` command (option C) is correct because it estimates file space usage by recursively summing the sizes of files and directories, typically reporting in blocks or with `-h` for human-readable output, making it ideal for checking how much disk space specific directories consume. The `df` command (option E) is also correct because it reports filesystem-level disk space usage, showing total, used, and available space per mounted filesystem, which is the standard way to check overall disk capacity. Option A, `mount`, only lists mounted filesystems and their mount points and does not report space usage. Option B, `lsof`, lists open files and the processes using them, which is unrelated to disk space accounting. Option D, `fdisk`, is a partitioning tool for creating and modifying disk partitions and does not report space 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.
- ✗
mount
Why it's wrong here
The `mount` command displays mounted filesystems and their mount points, not capacity or usage figures, so it cannot report free or consumed space. It is tempting because it lists the filesystems you would then query. `mount` is the right choice when you need to attach a filesystem or inspect current mount options and device mappings.
- ✗
lsof
Why it's wrong here
lsof lists open files and the processes holding them; it never reports filesystem capacity or free blocks. It is tempting because deleted-but-open files can consume space, so lsof helps diagnose that specific leak. For routine disk space usage, df reports mounted filesystem totals and du reports per-directory consumption.
- ✓
du
Why this is correct
du reports disk space consumed by files and directories, walking the filesystem to total usage per path. It complements df, which shows free space per mounted filesystem. For checking how much space directories occupy, du is the appropriate tool.
- ✗
fdisk
Why it's wrong here
fdisk partitions block devices; it reports partition tables and geometry, not filesystem space consumption. It is tempting because it lists disk sizes, but that reflects raw device capacity. Checking free space requires df for mounted filesystems or du for directory usage, which read filesystem allocation metadata rather than partition boundaries.
- ✓
df
Why this is correct
df reports filesystem-level disk space usage, showing total, used and available blocks plus mount points for each mounted filesystem. It satisfies the requirement to check disk space usage, complementing du, which instead measures space consumed by specific files and directories.
Go deeper
Related to this question
Learn chapter
Navigating the Filesystem
Key term
Output
In IT service management, output is the result or deliverable produced by a process, system, or component, such as data, reports, or services delivered to a customer.
Key term
Mount
Mounting is the process of making a file system or storage device accessible to a computer's operating system by attaching it to a specific directory in the existing directory tree.
About these practice questions
One of 781 original XK0-006 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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.