LLI Wiki — My Digital Knowledge Base

Linux hardware inventory: useful commands

Linux commands to inventory hardware: CPU, memory, disks, PCI, USB, network and BIOS/UEFI.

The table below groups common commands for inventorying the hardware of a Linux system. Where several commands are listed, they give equivalent or similar information.

Information Command
Overview of all hardware inxi -Fxz or hwinfo --short or lshw -short
Full CPU information lscpu or lshw -C cpu
CPU features (PAE, SSE2, etc.) lshw -C cpu | grep -i capabilities
32-bit or 64-bit architecture lshw -C cpu | grep -i width
Current memory size and configuration dmidecode -t memory | grep -i size or lshw -short -C memory
Maximum memory supported by the hardware dmidecode -t memory | grep -i max
Free memory slots lshw -short -C memory | grep -i empty (no output means no free slot)
Amount of video memory lspci | grep -i vga, then run again with the device number, for example lspci -v -s 00:02.0; the VRAM is the prefetchable value
Current memory usage free -m or top
List of disks lshw -short -C disk
Details of a disk hdparm -i /dev/sda (replace sda if necessary)
Disks and partitions lsblk (simple) or fdisk -l (detailed)
Partition UUIDs blkid
Mounted filesystems, mount points, space used and available (in MB) df -m
USB devices lsusb
PCI devices lspci
Network card details lshw -C network
Network interfaces ifconfig -a or ip link show or netstat -i
Routing tables ip route | column -t or netstat -r
BIOS/UEFI information dmidecode -t bios
Kernel version, hostname, etc. uname -a
Mastodon LLIMastodon SocialFosstodon