Introduction
In the Linux system management world, getting to know in depth the hardware installed is essential for tasks such as performance optimization, update planning and problem solving. The hwinfo command is presented as a complete and detailed tool that collects information on virtually all components of the computer. From CPU clock speed to RAM memory timings, through the exact model of the network card and the firmware version of the base plate, hwinfo provides data that would be difficult to obtain by several separate commands.
What is hwinfo?
hwinfo is a command line utility that consults the system via the libhd bookstore and displays comprehensive data on the CPU, memory, storage devices, network cards, graphic card and many other peripherals. Unlike simpler tools such as lshw or dmidecode, hwinfo offers a level of detail that includes firmware information, drivers and specific capabilities of each component. In addition, its output can be formatted in flat text, JSON or XML, which facilitates its integration into monitoring and automation scripts.
Installation
In most modern distributions, hwinfo is available in official repositories. In Debian and its derivatives like Ubuntu, just run sudo apt update followed by sudo apt install hwinfo. In Red Hat Enterprise Linux, CentOS and Fedora, the package is installed with sudo dnf install hwinfo or sudo yum install hwinfo according to the version. In Arch Linux and its derivatives, the command is obtained with sudo pacman -S hwinfo. After installation, the binary is in / usr / bin / hwinfo and is ready to be used without additional configuration.
Basic use
Running hwinfo without arguments produces an extensive output that covers all detected devices. To get a quick overview, you can use the summary with the -short argument, which shows only the basic models and states of each component. For example, hwinfo -short lists CPU, memory, disks and network interfaces in a few lines. If information in a specific category is required, short cuts can be used as -cpu for the central processing unit, -mem for memory, -disk for storage disks and -net for network cards.
Common examples
Some of the most common uses of hwinfo include:
- See the model and clock speed of each CPU core: hwinfo -cpu
- Get the capacity, type and speed of RAM modules: hwinfo -mem
- List hard drives and SSD with their size, interface and serial number: hwinfo -disk
- Show the graphic card information, including the chipset and driver version: hwinfo -gfxcard
- Check the status of network interfaces, such as link speed and manufacturer: hwinfo -net
- Get a full report in JSON format for later processing: hwinfo -json > report. json
Output and filtering
The hwinfo output can be voluminous, but includes options for filtering and formatting the information. The -filter argument allows to show only certain fields, for example hwinfo -filter cpu.*MHz will show only the CPU speed. Also, the -log-level argument controls verbosity, reducing debugging messages when not needed. To save output in a legible file, you can redirect the console to a text file or use the -output file option. In monitoring environments, combining hwinfo with tools such as grep or awk facilitates the extraction of specific data, such as the serial number of the base plate: hwinfo -bios | Grap Serial Number.
Conclusion
hwinfo has been consolidated as one of the most complete tools for hardware inventory in Linux systems. Its ability to offer finely granulated details, along with the possibility of exporting data in various formats, makes it an indispensable ally for administrators, developers and enthusiasts who need to know their team in depth. Whether to plan an update, diagnose a failure or simply document the configuration, hwinfo provides the necessary information quickly and reliably.


