XK0-006 practice question 8 of 15

Which of the following commands should an administrator use to see a full hardware inventory of a Linux system?

Full set: 149 questions
Answer options
A: dmidecode Correct answer
B: lsmod
C: dmesg
D: lscpu
Correct Answer:
A. dmidecode
Explanation

The dmidecode command is a tool for dumping a computer's DMI (Desktop Management Interface) table contents in a human-readable format. This table contains a detailed description of the system's hardware components, including the BIOS, system manufacturer, processor, memory modules, chassis, and other devices. It provides a comprehensive hardware inventory, which is exactly what the administrator requires.

Why Incorrect

B. lsmod lists the status of modules currently loaded into the Linux kernel, which is related to software drivers, not a hardware inventory.
C. dmesg prints the kernel ring buffer, which contains boot-time messages, including hardware detection, but it is a log, not a structured inventory.
D. lscpu provides detailed information specifically about the CPU and its architecture, not a full system hardware inventory.

References

1. dmidecode(8) — Linux manual page. (n.d.). Retrieved from https://man7.org/linux/man-pages/man8/dmidecode.8.html. See the NAME section: "dmidecode - DMI table decoder" and the DESCRIPTION section: "dmidecode is a tool for dumping a computer's DMI... table contents in a human-readable format."

2. Red Hat Enterprise Linux 9 Documentation. (2023). Chapter 27. Getting information about hardware. In Managing monitoring and automation. Retrieved from https://access.redhat.com/documentation/en-us/redhatenterpriselinux/9/html/managingmonitoringandautomation/getting-information-about-hardwaremanaging-monitoring-and-automation. See Section 27.1, "Displaying information about hardware with dmidecode."

Scroll to Top