How to Check Hardware Information on Linux
Table of Contents
Getting detailed information about your Linux system’s hardware is essential for troubleshooting, optimizing performance, and upgrading components. In this guide, we will show you how to check hardware information on Linux using various command-line utilities and graphical tools.
Using lshw
lshw (short for “list hardware”) is a command-line utility for Linux systems that provides detailed information about the computer’s hardware components, such as CPU, memory, storage devices, network interfaces, and more. It gathers information from various sources, including the kernel, sysfs, and procfs, to generate a comprehensive report on the system’s hardware.
lshw is designed to be user-friendly and can display the information in various formats, such as plain text, XML, or HTML. It is a helpful tool for troubleshooting, inventory management, or documentation purposes, as it provides a quick overview of the system’s hardware configuration.
Step 1: Open Terminal
Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.
Step 2: Install lshw
On Debian/Ubuntu-based distros, run:
sudo apt install lshw
On Fedora/RPM-based distros, run:
sudo dnf install lshw
On Arch-based distros, run:
sudo pacman -S lshw
Step 3: Run lshw
To display the hardware information, run:
sudo lshw
For a more readable output, run:
sudo lshw -short
Or to generate an HTML file, run:
sudo lshw -html > hardware-info.html
Using lspci and lsusb
lspci and lsusb are command-line utilities for Linux systems that provide information about the PCI (Peripheral Component Interconnect) devices and USB (Universal Serial Bus) devices connected to the system, respectively.
lspci: This utility lists all the PCI devices on the system, such as graphics cards, network interfaces, sound cards, and other hardware components that use the PCI bus. It can display information like device vendor, device model, and the bus it’s connected to. lspci is particularly useful for identifying hardware components, troubleshooting, and gathering information for driver installation.
lsusb: This utility lists all the USB devices connected to the system, such as keyboards, mice, storage devices, and other peripherals that use the USB interface. It displays information like device vendor, device model, and the USB bus it’s connected to. lsusb is useful for identifying USB devices, troubleshooting, and gathering information for driver installation or configuration.
Both lspci and lsusb are generally pre-installed on most Linux distributions, as they are part of the pciutils and usbutils packages, respectively.
Step 1: Open Terminal
Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.
Step 2: Run lspci and lsusb
To list all PCI devices, such as graphics cards and network interfaces, run:
lspci
To list all USB devices connected to your system, run:
lsusb
Using dmidecode
dmidecode is a command-line utility for Linux systems that provides information about the computer’s hardware components and system configuration by parsing the Desktop Management Interface (DMI) or System Management BIOS (SMBIOS) data. DMI is a standard that allows system manufacturers to store information about the hardware and its configuration in a standardized format, which can be accessed by software like dmidecode.
dmidecode displays various hardware details, such as system manufacturer, model, BIOS version, memory configuration, CPU details, and more. It is particularly useful for system administrators and technicians who need to gather hardware information for troubleshooting, inventory, or documentation purposes.
Step 1: Open Terminal
Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.
Step 2: Install dmidecode
On Debian/Ubuntu-based distros, run:
sudo apt install dmidecode
On Fedora/RPM-based distros, run:
sudo dnf install dmidecode
On Arch-based distros, run:
sudo pacman -S dmidecode
Step 3: Run dmidecode
To display hardware information, run:
sudo dmidecode
To view specific information, use flags like sudo dmidecode -t system for system information or sudo dmidecode -t memory for memory information.
Using inxi
Inxi is a command-line utility for Linux systems that provides comprehensive system information, including hardware, software, and system configuration details. It is a versatile tool, capable of displaying a wide range of information, such as CPU, memory, storage devices, graphics cards, network interfaces, audio devices, and more.
Inxi is designed to be user-friendly, with options to customize the output to display the information you need. It can be a helpful tool for troubleshooting, as it provides a quick overview of the system configuration and hardware components.
Step 1: Open Terminal
Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.
Step 2: Install inxi
On Debian/Ubuntu-based distros, run:
sudo apt install inxi
On Fedora/RPM-based distros, run:
sudo dnf install inxi
On Arch-based distros, run:
sudo pacman -S inxi
Step 3: Run inxi
To display the hardware information, run:
inxi -F
For more detailed information, run:
inxi -Fxxxz
Using graphical tools
HardInfo is a graphical hardware information tool for Linux systems. It provides an easy-to-use interface to display detailed information about your computer’s hardware components and system specifications. HardInfo can display information about the processor, memory, storage devices, graphics cards, network interfaces, and other components. It also provides benchmarking capabilities to test your system’s performance. HardInfo is a great tool for users who prefer a graphical user interface (GUI) over command-line utilities for checking hardware information.
Step 1: Open Terminal
Open the terminal by pressing Ctrl + Alt + T on your keyboard or by searching for it in the applications menu.
Step 2: Install HardInfo
On Debian/Ubuntu-based distros, run:
sudo apt install hardinfo
On Fedora/RPM-based distros, run:
sudo dnf install hardinfo
On Arch-based distros, run:
sudo pacman -S hardinfo
Step 3: Run HardInfo
After installation, run HardInfo from the application menu or by running:
hardinfo
Conclusion
With these command-line utilities and graphical tools, you can quickly and easily access detailed hardware information on your Linux system. Knowing your hardware components and their specifications can help you make informed decisions when upgrading or troubleshooting your system.