Linux Hardware Commands Cheat Sheet (Essential Terminal Commands)



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

CommandDescription
hostnamectl        System hostname, OS, kernel, architecture
uname -aKernel and system information
archCPU architecture
uptimeSystem running time and load

Device Serial Number & BIOS

CommandDescription
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

CommandDescription
lscpu    CPU architecture and cores
cat /proc/cpuinfo    Detailed CPU info
nproc        Number of processing units
top / htop        Live CPU usage

Memory (RAM) Information

CommandDescription
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

CommandDescription
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

CommandDescription
lsusb    Connected USB devices
lspci    PCI devices (GPU, network cards)
lsusb -t    USB device tree
lspci -v    Detailed PCI info

Network Hardware Information

CommandDescription
ip a    Network interfaces
ip link    Interface status
ethtool eth0    Network card details
nmcli device status    NetworkManager devices

GPU & Display Information

Command                                                    Description
lspci | 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

CommandDescription
sensorsCPU and system temperature
watch sensorsLive temperature monitoring
acpi -tThermal data

Complete Hardware Overview

CommandDescription
sudo lshwFull hardware summary
sudo lshw -shortHardware list (compact)
inxi -FxSystem 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

No comments

Theme images by chuwy. Powered by Blogger.