Essential Linux Commands to Inspect Hardware Details
This guide explains how to use a set of Linux commands—lshw, lscpu, free, df, lspci, and lsusb—to quickly retrieve comprehensive hardware information, helping administrators and users diagnose issues, plan upgrades, and understand system performance.
1. lshw – List hardware information
The lshw command provides a detailed inventory of all hardware components, including CPU, memory, disks, and network adapters. It must be run with super‑user privileges: sudo lshw The output contains manufacturer, model, driver details, and more, which can be scrolled through to examine the full hardware profile.
2. lscpu – View CPU details
lscpudisplays architecture, CPU model, core count, thread count, and other CPU characteristics without requiring elevated permissions. lscpu The command is useful for quickly checking the processor’s basic specifications.
3. free – Check memory usage
The free command reports total, used, and available memory. Using the -m option shows the values in megabytes for easier interpretation: free -m The output also includes buffers and cache information.
4. df – Inspect disk space
dfreports filesystem disk usage. The -h flag formats the sizes in a human‑readable way (e.g., GB, MB): df -h This command helps identify which mount points are consuming space.
5. lspci – List PCI devices
lspcienumerates PCI devices such as graphics cards, network cards, and sound cards, showing device IDs, manufacturers, and models. No admin rights are required.
lspci6. lsusb – List USB devices
lsusbdisplays information about USB devices attached to the system, including vendor, product name, and device ID. It also runs without elevated privileges: lsusb These commands together provide a quick and comprehensive view of a Linux system’s hardware, useful for troubleshooting, capacity planning, and performance tuning.
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.
