XK0-005 · Question #282
A systems administrator logs into a Linux server and must identify whether the server is a physical or virtual machine. Which of the following commands should the administrator run?
The correct answer is C. dmidecode. To determine if a Linux server is a physical or virtual machine, the dmidecode command should be run, as it retrieves hardware information from the system's DMI table which often includes virtualization-specific details. This output can reveal the system's manufacturer, product…
Question
A systems administrator logs into a Linux server and must identify whether the server is a physical or virtual machine. Which of the following commands should the administrator run?
Options
- Avmstat
- Bcat /proc/cpuinfo
- Cdmidecode
- Dmodinfo
How the community answered
(30 responses)- A3% (1)
- B3% (1)
- C93% (28)
Why each option
To determine if a Linux server is a physical or virtual machine, the `dmidecode` command should be run, as it retrieves hardware information from the system's DMI table which often includes virtualization-specific details. This output can reveal the system's manufacturer, product name, and other clues indicating if it is a virtual platform.
`vmstat` reports virtual memory statistics, CPU activity, disk I/O, and other system performance metrics, but it does not directly identify whether the system is physical or virtual.
`cat /proc/cpuinfo` displays detailed CPU information, which might contain flags like "hypervisor" that suggest virtualization, but `dmidecode` provides more conclusive and direct system identification.
The `dmidecode` command reads information from the DMI table, also known as SMBIOS, which contains detailed hardware information. This output often includes manufacturer and product names (e.g., "VMware", "VirtualBox", "KVM") that explicitly identify a system as a virtual machine or a specific hypervisor's virtual hardware.
`modinfo` displays information about a specific Linux kernel module, such as its description, author, and parameters, which is not directly used to determine if a system is physical or virtual.
Concept tested: Identifying physical vs. virtual machines on Linux
Source: https://man7.org/linux/man-pages/man8/dmidecode.8.html
Topics
Community Discussion
No community discussion yet for this question.