To extract hardware information of the system, the Linux system introduced the command-line utility “lshw.”
The “lshw” command is a small tool to display a complete picture of hardware configuration. While using this command in a terminal, you will get a print of CPU version, memory configuration, cache information, bus speed, and other PowerPC machines running on the backend.
It is a simple command-line tool, but to display complete information, you must be a super-user; otherwise, it will print partial information.
lshw Command Syntax:
Syntax of lshw command is:
Simply run the “lshw” command to get the complete configuration picture in the terminal with root privileges.
lshw command formats can be:
The “short” command-line option is used to display hardware paths in a compact format.
To print hardware information in html format, use the “-html” command-line in the terminal.
To print hardware configuration details in xml format, type “-xml” in the terminal.
lshw Command Options:
lshw command tool supports multiple options. Every function has its unique functionality.
It is used when you want to enable different parameters of the system. For example, I want to allow the “speed” parameter; the command would be:
To disable any parameter’s functionality, use the “-disable” option with the parameter name.
For example, I enabled “speed” in the above section, So, to disable it:
The “quite” option is used to hide display status.
The “sanitize” option is used when users don’t want to display sensitive information.
When we use the “sanitize” option with the “lshw” command, it will print hardware information without any sensitive data.
To get any help related to the “lshw” command, type “–help” in the terminal, and it will display format options, available command options, and other helping material as well.
The “lshw” is a command-line tool to extract hardware configuration. We don’t need to install a specific tool or application for this purpose; Linux introduced a small built-in utility to configure hardware data like memory information, cache data, busses, ports, CPU configuration, etc. This guide has seen multiple formats that can display data and “lshw” options to perform different functions.