When you are auditing a headless Linux server or troubleshooting a complex hardware compatibility issue, you cannot simply open a graphical “System Information” panel. You need to know exactly how much RAM is physically installed in the motherboard, the exact clock speed of the CPU architecture, and the precise firmware version of the network interface card. To force the Linux kernel to bypass the software layer and rip the raw physical specifications directly out of the motherboard’s BIOS chips, you must use the lshw (List Hardware) command.
Executing a Complete Hardware Audit
The lshw command is a deep-level extraction tool. It mathematically interrogates every single physical component connected to the motherboard, from the massive CPU down to the smallest USB controller chip.
Because accessing this raw hardware data requires deep kernel-level privileges, you must execute the command as the root user (using sudo):
sudo lshw
The moment you press Enter, the terminal will explode with thousands of lines of highly complex, incredibly dense architectural data. It will output a massive tree structure detailing every single microchip, bus speed, memory bank, and storage controller inside the physical machine.
Because this output is so chaotic, it is highly recommended to pipe the output into a text file for later review, or use the -short flag to force the engine to summarize the data into a clean, human-readable table:
sudo lshw -short
Targeting Specific Hardware Classes
If you only care about upgrading the server’s RAM, reading through a massive output file containing GPU specifications and audio controller firmwares is a massive waste of time. You must force the lshw engine to surgically isolate a specific hardware class.
You achieve this using the -C (Class) flag, followed by the exact hardware category you want to audit.
To audit only the physical Memory (RAM):
sudo lshw -C memory
The engine ignores the CPU and the hard drives entirely, outputting exactly how many gigabytes of RAM are installed, what speed they are rated for (e.g., 3200MHz), and exactly which physical slot on the motherboard they occupy.
To audit the Network Interface Cards (NIC):
sudo lshw -C network
This instantly reveals the exact MAC address, the vendor chipset, and whether the physical ethernet port is currently connected to a live switch.