일. 8월 3rd, 2025

Why Monitor Hardware in Linux?

Understanding your system’s hardware is essential for troubleshooting, driver compatibility, performance tuning, and upgrade planning. Linux offers powerful built-in commands and tools to extract detailed hardware insights without third-party software.


Essential Terminal Commands

1. CPU & Architecture

Command: lscpu
Output Includes:

  • CPU model, cores, threads, and architecture (e.g., x86_64, ARM)
  • CPU family, model name, and clock speed
  • Virtualization support (VT-x/AMD-V)
    Example:
    lscpu | grep "Model name"  
    Model name:            Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz

2. PCI Devices (GPUs, NICs, etc.)

Command: lspci
Flags:

  • -v: Verbose details (driver/module in use)
  • -k: Show kernel drivers
    Example:
    lspci -v | grep -A 8 VGA  # Identify graphics card

3. USB Devices

Command: lsusb
Output: Vendor IDs, connected devices (keyboards, webcams, etc.)
Pro Tip: Use lsusb -t for a tree view of USB ports/hubs.

4. Comprehensive Hardware Overview

Command: sudo lshw
Flags:

  • -short: Simplified summary
  • -html > report.html: Generate HTML report
    Example:
    sudo lshw -short | grep -i disk  # List disks

5. Storage (Disks & Partitions)

  • Block Devices: lsblk (shows disk partitions, sizes, mount points)
  • Disk Free Space: df -h (human-readable storage usage)
  • Partition Details: sudo fdisk -l

6. RAM & BIOS

Command: sudo dmidecode
Target Specifics:

  • Memory: sudo dmidecode -t memory
  • BIOS: sudo dmidecode -t bios
  • System: sudo dmidecode -t system

User-Friendly Tools

inxi (Install via sudo apt install inxi)

All-in-One Summary:

inxi -Fxz  

Flags:

  • -F: Full system report
  • -x: Extended details
  • -z: Hide sensitive data (MAC addresses)

Hardinfo (GUI Tool)

Install with sudo apt install hardinfo for graphical hardware exploration.
Features: Interactive menus, benchmark tests, and report generation.


Practical Examples

  1. Identify Unknown Network Controller:
    lspci | grep -i network
  2. Check RAM Slots & Capacity:
    sudo dmidecode -t memory | grep -i size
  3. Verify Disk Health:
    sudo smartctl -a /dev/sda  # Requires `smartmontools`

Key Notes

  • Use sudo for commands accessing low-level hardware (e.g., dmidecode, lshw).
  • Pipe outputs to grep for quick filtering (e.g., lspci | grep -i "vga").
  • Combine tools: lshw + dmidecode gives the most exhaustive details.

🔧 Troubleshooting Tip: If hardware isn’t detected, update the PCI ID database with sudo update-pciids.

Master these commands to unlock complete visibility into your Linux system’s hardware! 🐧💻

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다