How to Quickly Inspect Linux Hardware Details with Built‑In Commands
This guide lists essential Linux commands for retrieving comprehensive hardware information—including CPU, memory, disk, network interfaces, PCI, USB, SCSI, and BIOS details—along with example outputs and explanations for each category on an Ubuntu 16.04 system.
CPU
Use lscpu to display CPU statistics such as architecture, number of cores, threads per core, cache sizes, and virtualization support. Example output shows a single Intel i5‑7500 core with 3.4 GHz frequency. Detailed per‑CPU data can also be read from /proc/cpuinfo, which lists vendor, model, stepping, MHz, cache size, and other flags.
Memory
Summarize memory usage with free -m, which reports total, used, free, and cached memory in megabytes (e.g., 1970 MB total). For a deeper view, inspect /proc/meminfo to see values such as MemTotal, MemFree, Buffers, and Cached. Hardware limits and supported types are available via dmidecode -t memory, revealing maximum module size (32 GB), total capacity (491 GB), supported speeds, and voltage.
Disk
List block devices and partitions with lsblk, showing a 500 GB disk ( sda) with a swap partition and root filesystem. Detailed partition tables can be displayed using fdisk -l, which provides sector counts, sizes, and partition types.
Network Interface
Identify Ethernet controllers using lspci | grep -i eth. Show all network interfaces with ifconfig -a or ip link show. For interface capabilities, run ethtool ens33 to see supported link modes, speed (1000 Mb/s), duplex, auto‑negotiation, and link status.
PCI
Display all PCI devices with lspci, which lists host bridges, USB controllers, VGA cards, and network adapters. The output can be interpreted as a tree structure, illustrating how bridges connect devices across three PCI buses. Use lspci -v or lspci -vv for verbose details, and lspci -t to view the device hierarchy.
USB
List USB devices with lsusb, showing root hubs and virtual devices. The command lsusb -t prints the USB topology similar to cat /sys/kernel/debug/usb/devices. Vendor and product IDs can be cross‑referenced in /var/lib/usbutils/usb.ids to identify manufacturers such as Kingston.
All‑Hardware Summary
Generate a complete hardware overview in HTML format with lshw -html > /hardware.html. Opening the resulting file in a browser presents a structured view of CPU, memory, storage, network, and other components.
SCSI
Show SCSI controller and device information using lsscsi. The output lists virtual disks and CD/DVD drives; after inserting a USB drive, lsscsi will also display the new disk (e.g., a Kingston DataTraveler).
BIOS
Extract BIOS details with dmidecode -t bios, which reports vendor, version, release date, ROM size, and supported features such as ACPI, boot options, and legacy interfaces. For a concise dump of all useful DMI data, use dmidecode -q.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
