Hardware
A comprehensive guide to hardware information, management, and troubleshooting in Linux systems.
๐ป System Hardware Overview
System Information
# Basic system information
uname -a # Kernel and system information
dmidecode # DMI/SMBIOS information
lshw # Detailed hardware configuration
hwinfo # Hardware information
inxi -Fx # System information summary
# System firmware/BIOS
dmidecode -t bios # BIOS information
systemd-boot # Boot loader status
efibootmgr # EFI boot entries๐ CPU Information
CPU Details
# CPU information
lscpu # CPU architecture information
cat /proc/cpuinfo # Detailed CPU information
nproc # Number of processing units
cpuid # x86 CPU identification
# CPU performance
mpstat -P ALL # CPU statistics
turbostat # CPU frequency and power
cpupower frequency-info # CPU frequency information
stress-ng --cpu 8 # CPU stress testCPU Temperature
# Temperature monitoring
sensors # Hardware sensor information
watch -n 1 sensors # Monitor temperature in real-time
cat /sys/class/thermal/thermal_zone*/temp # Raw temperature data
s-tui # Terminal UI for monitoring๐งฎ Memory Hardware
Memory Information
# Memory details
free -h # Memory usage
dmidecode -t memory # Memory hardware info
cat /proc/meminfo # Detailed memory information
lshw -class memory # Memory hardware configuration
# Memory testing
memtest86+ # Memory testing tool
memtester 1024 1 # Test 1GB RAM once
badram # Memory blacklisting๐ฝ Storage Devices
Disk Information
# Storage device listing
lsblk # List block devices
fdisk -l # Disk partition information
parted -l # Partition information
hdparm -i /dev/sda # HDD information
# SMART status
smartctl -a /dev/sda # SMART attributes
smartctl -t short /dev/sda # Short self-test
smartctl -H /dev/sda # Health statusStorage Performance
# Disk performance
hdparm -tT /dev/sda # Read speed test
dd if=/dev/zero of=test bs=1G count=1 # Write speed test
iostat -x 1 # I/O statistics
iotop # I/O monitoringRAID Information
# RAID status
cat /proc/mdstat # Software RAID status
mdadm --detail /dev/md0 # RAID array details
mdadm --examine /dev/sda1 # Examine RAID component๐ฎ Peripheral Devices
USB Devices
# USB information
lsusb # List USB devices
lsusb -t # USB device tree
usb-devices # Detailed USB information
tail -f /var/log/syslog # Monitor USB eventsInput Devices
# Input device information
xinput list # List X input devices
libinput list-devices # List input devices
evtest # Input device testing
cat /proc/bus/input/devices # Input device detailsAudio Devices
# Audio hardware
aplay -l # List audio playback devices
arecord -l # List recording devices
alsamixer # Audio mixer
pacmd list-sinks # PulseAudio output devices๐จ Display and Graphics
Display Information
# Display hardware
xrandr # Display information
glxinfo # OpenGL information
lspci | grep -i vga # Graphics card info
nvidia-smi # NVIDIA GPU information
# Monitor information
edid-decode # Monitor EDID information
xdpyinfo # X display information
ddcutil detect # Monitor detection๐ Power Management
Power Information
# Power status
upower -i /org/freedesktop/UPower/devices/battery_BAT0 # Battery info
acpi -V # ACPI information
powertop # Power consumption analysis
tlp-stat # TLP power management status๐ก๏ธ Sensors and Monitoring
Hardware Sensors
# Sensor information
sensors # Hardware sensors
sensors-detect # Detect hardware sensors
hddtemp /dev/sda # HDD temperature
ipmitool sensor # IPMI sensors (servers)๐ง Hardware Configuration
PCI Devices
# PCI information
lspci # List PCI devices
lspci -v # Verbose PCI information
lspci -k # Show kernel drivers
update-pciids # Update PCI ID databaseDriver Information
# Driver details
lsmod # List loaded modules
modinfo module_name # Module information
dmesg | grep driver # Driver messages
ubuntu-drivers devices # Available drivers๐ก Best Practices
Regular Monitoring
Monitor hardware health
Track temperature trends
Check storage SMART status
Monitor system logs
Maintenance
Regular SMART tests
Update firmware
Clean cooling systems
Check error logs
Documentation
Keep hardware inventory
Document configurations
Track hardware changes
Maintain driver versions
Performance
Monitor performance metrics
Track resource usage
Benchmark regularly
Document baselines
๐ง Troubleshooting
Hardware Issues
# System logs
dmesg # Kernel messages
journalctl -k # Kernel journal
cat /var/log/syslog # System log
mcelog # Machine check exceptions
# Hardware diagnostics
memtest86+ # Memory testing
smartctl -t long /dev/sda # Disk testing
stress-ng # System stress testingPerformance Issues
# Performance analysis
sar # System activity report
iostat # I/O statistics
vmstat # Virtual memory stats
perf # Performance analysis๐ ๏ธ Advanced Tools
Server Hardware
# Server management
ipmitool # IPMI management
racadm # Dell DRAC management
hpasmcli # HP management
storcli # RAID controller managementFirmware Management
# Firmware tools
fwupdmgr # Firmware update manager
flashrom # ROM/flash programming
dmidecode # DMI table decoder
biosdecode # BIOS information decoderHardware Security
# TPM status
tpm2_getcap # TPM capabilities
tpm2_selftest # TPM self-test
mokutil --sb-state # Secure Boot status๐ Documentation Tools
System Reports
# System documentation
lshw -html > hw.html # Hardware report in HTML
hardinfo # GUI hardware information
inxi -Fxz # Detailed system report
sosreport # System information reportLast updated
Was this helpful?