How do I check the system hardware in Linux?

Whether you’re a seasoned sysadmin, a curious tinkerer, or just someone wanting to know more about their Linux machine, examining system hardware is a valuable skill. Knowing how to check your hardware components and their status can help troubleshoot issues, upgrade your system, or simply satisfy your curiosity. In this guide, we’ll explore various methods to inspect and monitor your system’s hardware in a Linux environment.

Using Command-Line Utilities

1. lshw (List Hardware)

  • Installation: Most Linux distributions have lshw pre-installed, but if not, you can usually install it via your package manager (e.g., sudo apt install lshw for Debian/Ubuntu).
  • Usage: Open your terminal and run sudo lshw to display detailed hardware information. Use -short for a more concise summary.

2. lscpu (List CPU Information)

  • Installation: This utility is also typically pre-installed. If not, install it with sudo apt install util-linux (for Debian/Ubuntu).
  • Usage: Running lscpu in your terminal will provide detailed information about your CPU, including its architecture, number of cores, and more.

3. lsblk (List Block Devices)

  • Installation: You’ll find lsblk on most Linux systems. If not, install it via your package manager.
  • Usage: Type lsblk to see a tree-like structure of your block devices, including hard drives and partitions.

4. free (Display Memory Usage)

  • Installation: free is typically pre-installed.
  • Usage: Run free -m to display memory usage in megabytes or free -g for gigabytes. It provides information about total, used, and free memory.

5. df (Display Disk Space Usage)

  • Installation: df is another command-line tool that’s usually pre-installed.
  • Usage: Type df -h to list available disk space on your filesystems in human-readable format.

Graphical Tools

1. GNOME System Monitor

  • Installation: If you use the GNOME desktop environment, you likely have the System Monitor pre-installed. If not, you can install it through your package manager.
  • Usage: Launch it from your applications menu, and you’ll find tabs for viewing system resources, including CPU, memory, and storage.

2. KDE System Monitor (KSysGuard)

  • Installation: KSysGuard comes with the KDE Plasma desktop environment.
  • Usage: Access it through your application launcher. It provides detailed system information and real-time monitoring of resource usage.

3. HardInfo

  • Installation: You may need to install HardInfo via your package manager (e.g., sudo apt install hardinfo for Debian/Ubuntu).
  • Usage: After installation, open HardInfo, and you’ll find a comprehensive hardware report organised into categories.

Specialised Tools

1. hwinfo

  • Installation: hwinfo may require installation through your package manager (e.g., sudo apt install hwinfo for Debian/Ubuntu).
  • Usage: Run sudo hwinfo to obtain extensive hardware information, including details about peripherals and network devices.

2. inxi

  • Installation: inxi is not always pre-installed but can be installed using your package manager.
  • Usage: Execute inxi -F for a full hardware report. It’s known for its easy-to-read and informative output.

Checking Specific Hardware Components

1. GPU (Graphics Processing Unit)

  • Nvidia: Use the nvidia-smi command if you have Nvidia graphics.
  • AMD: For AMD GPUs, radeontop provides insights into GPU utilisation.

2. Hard Drive SMART Data

  • Install smartmontools via your package manager and use smartctl to check the health and SMART attributes of your hard drives.

3. Temperature and Fan Speed

  • Tools like lm-sensors and psensor can help you monitor temperature sensors and fan speeds. Install them using your package manager.

Conclusion

Being able to check your system’s hardware is a valuable skill for Linux users, whether you’re a novice or an experienced sysadmin. The methods and tools mentioned in this guide should empower you to explore your hardware, diagnose issues, and make informed decisions about upgrades or optimisations. Whether you prefer command-line utilities or graphical tools, Linux offers a diverse range of options for hardware inspection and monitoring.

Scroll to Top