XK0-006 Troubleshooting Practice Question
An administrator wants to check the amount of free memory and swap usage on a system in a human-readable format. Which command should be used?
⚠ Common exam trap
XK0-006 often tests the assumption that any command with a -h flag produces human-readable output, when in fact -h means different things (or nothing) across tools like vmstat and iostat, leading candidates away from free -h.
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
✓
free -h
The free command displays total, used, and available physical memory and swap space, and the -h flag formats the output in human-readable units such as MiB and GiB. This directly satisfies the requirement to check free memory and swap usage in a readable format. It is the standard Linux utility for this purpose.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
free -h
Why this is correct
'free -h' reads /proc/meminfo and prints total, used and available RAM alongside swap usage, with the -h flag scaling values into human-readable units such as MiB and GiB. This directly satisfies the requirement for readable free memory and swap figures.
- ✗
vmstat -h
Why it's wrong here
vmstat has no -h flag; it prints raw columns, and its free/swap figures are in kilobytes, not human-readable units. It is tempting because vmstat does report memory and swap statistics, making it the right choice when you need sampling intervals and paging activity rather than formatted totals.
- ✗
cat /proc/meminfo
Why it's wrong here
/proc/meminfo reports raw values in kibibytes with no unit conversion, so it is not human-readable. It is tempting because it is the authoritative kernel source for memory and swap figures, making it correct when scripting or parsing exact byte counts rather than reading formatted output.
- ✗
iostat -h
Why it's wrong here
iostat reports CPU and per-device disk I/O statistics; its -h flag only humanises those numbers, so it never reads /proc/meminfo or swap. It is tempting because it also displays human-readable output, but that is disk throughput, not free memory and swap.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
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
Linux
Linux is an open-source operating system that manages computer hardware and software, widely used in servers, desktops, and embedded systems.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
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.