Linux provides powerful built-in tools to inspect hardware without installing third-party software. This Linux hardware commands cheat sheet lists the most useful commands for checking system information, CPU, memory, disks, network, and device serial numbers.
System & Device Information
| Command | Description |
|---|
hostnamectl | System hostname, OS, kernel, architecture |
uname -a | Kernel and system information |
arch | CPU architecture |
uptime | System running time and load |
Device Serial Number & BIOS
| Command | Description |
|---|
sudo dmidecode -s system-serial-number | Device serial number |
sudo dmidecode -t system | Full system details |
sudo dmidecode -t bios | BIOS information |
cat /sys/class/dmi/id/product_serial | Serial number (if available) |
CPU Information
| Command | Description |
|---|
lscpu | CPU architecture and cores |
cat /proc/cpuinfo | Detailed CPU info |
nproc | Number of processing units |
top / htop | Live CPU usage |
Memory (RAM) Information
| Command | Description |
|---|
free -h | Memory usage (human-readable) |
cat /proc/meminfo | Detailed RAM stats |
vmstat | Memory and system performance |
sudo dmidecode -t memory | Physical RAM details |
Disk & Storage Information
| Command | Description |
|---|
lsblk | Block devices and mount points |
df -h | Disk usage |
du -sh /path | Folder size |
blkid | Disk UUID and filesystem |
sudo fdisk -l | Disk partition details |
USB & PCI Devices
| Command | Description |
|---|
lsusb | Connected USB devices |
lspci | PCI devices (GPU, network cards) |
lsusb -t | USB device tree |
lspci -v | Detailed PCI info |
Network Hardware Information
| Command | Description |
|---|
ip a | Network interfaces |
ip link | Interface status |
ethtool eth0 | Network card details |
nmcli device status | NetworkManager devices |
GPU & Display Information
Command Descriptionlspci | grep -i vga
Detect installed GPU
xrandr
Display resolution & monitors
glxinfo | grep OpenGL
Show OpenGL and GPU driver info
Battery & Power (Laptops)
Command Description
upower -i $(upower -e | grep BAT) Display detailed battery status
acpi -V Battery and thermal info
powertop Power usage analysis
Temperature & Sensors
| Command | Description |
|---|
sensors | CPU and system temperature |
watch sensors | Live temperature monitoring |
acpi -t | Thermal data |
Complete Hardware Overview
| Command | Description |
|---|
sudo lshw | Full hardware summary |
sudo lshw -short | Hardware list (compact) |
inxi -Fx | System overview (if installed) |
Pro Tips
-
Use sudo for BIOS and firmware-level data
-
Combine commands with grep for faster output
-
Most commands work across Ubuntu, Debian, Fedora, Arch, RHEL
Post a Comment