Courseiva
mediumMultiple SelectObjective-mapped

XK0-006 Practice Question: Which TWO commands can be used to display the…

Which TWO commands can be used to display the amount of free and used memory on a Linux system?

⚠ Common exam trap

CompTIA often tests the distinction between disk space commands (`df`, `du`) and memory commands (`free`, `/proc/meminfo`), trapping candidates who confuse filesystem usage with RAM 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

free -h

The `free -h` command displays the total, used, and free physical memory (RAM) and swap space in a human-readable format. The `cat /proc/meminfo` command reads the kernel's memory statistics directly from the virtual filesystem, providing detailed information about memory usage, including free, available, buffered, and cached memory. Both commands are standard tools for inspecting memory utilization on a Linux system.

Answer analysis

Option-by-option breakdown

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

  • df -h

    Why it's wrong here

    df shows disk partition usage, not memory.

  • du -sh

    Why it's wrong here

    du shows disk usage of files/directories.

  • free -h

    Why this is correct

    free displays memory usage in human-readable format.

  • cat /proc/meminfo

    Why this is correct

    /proc/meminfo contains detailed memory information.

  • iostat

    Why it's wrong here

    iostat reports CPU and I/O statistics.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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 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.