Want to check your Linux PC or laptop hardware information, e.g., CPU, GPU, Motherboard, and Memory.? There are quite a few tools to do the job, and here are 12 of them.
Graphical Tools to check hardware info in Linux:
Hardinfo is a GTK tool that gathers information about the hardware and operating system, performs benchmarks, and generates reports.
With Hardinfo, you can check your PC’s full specifications in ALT Linux, Arch Linux, CentOS, Debian, Fedora 32, OpenSUSE, Slackware, Ubuntu, Linux Mint, and more, since the tool is available to install via system package manager.
CPU-X is a free and open-source tool, similar to CPU-Z, that gathers information on CPU, motherboard and more.
The software is also available in main repositories of the most recent Linux Distros, e.g., Ubuntu 20.04, Debian 11 and sid, Arch Linux, Fedora 32, FreeBSD, etc.
Which means you can install the tool either via
pkg commands, or system package manager.
There are also some other graphical tools to gather hardware information, e.g., I-Nex, CPU-G, they are however not in active development.
Command Line Tools to Check PC Specs in Linux:
Dmidecode is a command-line tool for dumping a computer’s DMI table contents in a human-readable format.
With it, you can display the information about bios, system, baseboard, chassis, processor, memory, cache, connector, slot.
Here are some command examples:
sudo dmidecode -t system
sudo dmidecode -t processor
sudo dmidecode -t memory
Hwinfo is a probe for hardware that can be used to generate a system overview log which can be later used for support.
You can run
hwinfo --HARDWARE_ITEM command, where HARDWARE_ITEM can be one in below:
all, arch, bios, block, bluetooth, braille, bridge, camera, cdrom, chipcard, cpu, disk, dsl, dvb, fingerprint, floppy, framebuffer, gfxcard, hub, ide, isapnp, isdn, joystick, keyboard, memory, mmc-ctrl, modem, monitor, mouse, netcard, network, partition, pci, pcmcia, pcmcia-ctrl, pppoe, printer, redasd, reallyall, scanner, scsi, smp, sound, storage-ctrl, sys, tape, tv, uml, usb, usb-ctrl, vbe, wlan, xen, zip
Or just run following command to show a summary:
Inxi is a command line system information script for console and IRC. You can inxi command with many standard options, e.g.,
Because inxi is often used on forums for support, you can also trigger this filtering with the -z option (-Fz, for example). To override the IRC filter, you can use the -Z option. This can be useful in debugging network connection issues online in a private chat, for example.
Here’s an example output of the basic info:
lshw, stands for list hardware, is a small tool that can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc.
You can run lshw to get a full list of information, or run command below to get a summary:
sudo lshw -short
lscpu, list cpu, displays information about the CPU architecture.
Simply run the command in terminal, and it outputs CPU architecture information from sysfs, /proc/cpuinfo and any applicable architecture-specific libraries (e.g. librtas on Powerpc).
lspci, list pci, is a command line tool to display information about PCI buses in the system and devices connected to them.
The command by default displays a brief list of devices. You can however add
-vvv flag for detailed, more detailed, everything.
lsusb, list USB devices, is a command line tool to display information about USB buses in the system and devices connected to them.
Similar to lspci, it displays a brief list of devices. You can however add
-v flag for detailed information.
lsmem lists the ranges of available memory with their online status.
$lsmem RANGE SIZE STATE REMOVABLE BLOCK 0x0000000000000000-0x000000008fffffff 2.3G online yes 0-17 0x0000000100000000-0x000000016fffffff 1.8G online yes 32-45 Memory block size: 128M Total online memory: 4G Total offline memory: 0B
hdparm is a command line tool to get SATA/IDE device parameters.
sudo hdparm -i /dev/sda
12. cat /proc files
cat is a linux command to print files in console.
With it, you can print cpu info via:
And print memory info via:
While the graphical tools are more friendly for those new to Linux desktops. The command line tools may provide more detailed or specific hardware information that you need.
If you have more ways to check hardware info in Linux, feel free to leave comment at the bottom.