How to Find the Hardware Specifications of Your Ubuntu Machine

Unlike Windows, which provides a clean graphical “System Information” panel, or macOS, which has the “About This Mac” screen, identifying the exact hardware inside a Linux machine is traditionally done via the command line. If you have inherited a headless Ubuntu server, or you are trying to troubleshoot a driver issue on an older laptop, knowing exactly what CPU, RAM, and storage drives are installed is critical.

Fortunately, Ubuntu includes a suite of built-in commands that can query the motherboard and print detailed hardware specifications directly to your terminal screen without needing to install third-party diagnostic software.

This guide explains the most useful commands for finding your Ubuntu machine’s hardware specifications.

The All-In-One Command: lshw

The lshw (List Hardware) command is the most comprehensive tool available in Ubuntu. It queries the system’s DMI (Desktop Management Interface) to pull everything from your RAM timings to your BIOS version.

Because it needs to probe hardware at a very low level, you must run it as the root user:

sudo lshw

This will output a massive, scrolling wall of text. It is usually too much information to read comfortably. To make the output significantly more readable, use the “short” flag:

sudo lshw -short

This prints a clean, tabulated list showing the device class (e.g., memory, processor, network), the hardware path, and a brief description of the specific model (e.g., “Intel Core i7-9700K” or “16GB SODIMM DDR4”).

Finding Specific Components

If you do not want to parse the entire lshw list, you can use specialized commands designed for specific hardware components.

1. CPU Specifications (lscpu)

To find out exactly what processor you have, how many cores it possesses, and its architecture (32-bit vs 64-bit), use the List CPU command. You do not need sudo for this:

lscpu

Look for the “Model name” row for the exact processor branding, and the “CPU(s)” row for your total core count.

2. RAM Capacity (free -h)

To find out how much RAM is installed in the system and how much is currently being used, use the free command. The -h flag formats the output in “human-readable” numbers (Megabytes and Gigabytes instead of raw bytes):

free -h

Look at the “Mem:” row. The “total” column shows your installed physical RAM.

3. Hard Drives and Storage (lsblk)

To see all the physical storage drives attached to the system, including USB drives, use the List Block Devices command:

lsblk

This outputs a tree diagram showing the root drives (e.g., sda, nvme0n1) and their total size, along with all the partitions underneath them. This is the best way to verify if a new hard drive has been physically recognized by the motherboard.

4. Graphics Cards and PCI Devices (lspci)

To identify your GPU, sound card, or network adapters, use the List PCI command. This queries everything plugged into the motherboard’s PCI lanes:

lspci

Because this list can also be long, you can filter the output specifically for your graphics card using the grep command:

lspci | grep -i vga

This will instantly print the exact model of your NVIDIA, AMD, or Intel graphics processor.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.