How To

Install dmidecode and Check Hardware Specs on Linux

When you inherit a Linux box with no documentation and need to know what hardware is underneath, dmidecode is the first tool to reach for. It reads the SMBIOS/DMI tables the BIOS exposes and prints a complete inventory: system make and model, BIOS version, CPU details, memory slots (including DIMM serial numbers and bank locations), chassis type, baseboard, and every other piece of hardware the firmware knows about. On a baremetal server it’s indispensable, and even on a VM it shows you exactly what the hypervisor is advertising to the guest. It’s one of the first tools we reach for during a Rocky Linux 10 post-install pass on new hardware.

Original content from computingforgeeks.com - post 2295

This guide walks through installing dmidecode and running the queries you’ll use day-to-day on Ubuntu 24.04 LTS, Debian 13, Rocky Linux 10, and any other mainstream Linux distro.

Tested April 2026 on Ubuntu 24.04.4 LTS with dmidecode 3.5 reading SMBIOS 2.8 tables

Step 1: Install dmidecode

Every mainstream distro ships dmidecode in the default repositories. On Ubuntu 24.04 or Debian 13:

sudo apt update
sudo apt install -y dmidecode

On Rocky Linux 10, AlmaLinux 10, RHEL 10, or Fedora 42:

sudo dnf install -y dmidecode

Confirm the install and check the version:

dmidecode --version

dmidecode is a slow-moving tool, and 3.5 is the current stable release:

3.5

dmidecode needs to read from /sys/firmware/dmi/tables (or /dev/mem on older kernels) so it requires root. Every command below uses sudo.

Step 2: The one-line system summary

For a quick identity check, dmidecode -s extracts a single field by name. These four cover 90% of the “what is this box” questions:

sudo dmidecode -s system-manufacturer
sudo dmidecode -s system-product-name
sudo dmidecode -s bios-version
sudo dmidecode -s processor-version

On the test VM (a QEMU guest running under KVM) the output reports the emulated machine type:

QEMU
Standard PC (i440FX + PIIX, 1996)
rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org
pc-i440fx-9.2

On a Dell PowerEdge you’d see something like Dell Inc., PowerEdge R750, 2.10.1, and Intel(R) Xeon(R) Gold 6338 CPU @ 2.00GHz. A full list of supported string keywords is in the dmidecode man page, plus you can list them with dmidecode -s help.

Step 3: Query by DMI type

For fuller reports use -t (type). Common types:

  • 0 or bios: BIOS information
  • 1 or system: System (manufacturer, product, serial, UUID)
  • 2 or baseboard: Motherboard
  • 3 or chassis: Chassis
  • 4 or processor: Per-CPU details
  • 16 or memory: Physical memory array
  • 17: Memory devices (one entry per DIMM slot)

Get the BIOS version, release date, and supported features:

sudo dmidecode -t bios

On a QEMU guest you’ll see the SeaBIOS build it was compiled with and the firmware’s release date:

BIOS Information
	Vendor: SeaBIOS
	Version: rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org
	Release Date: 04/01/2014
	Address: 0xE8000
	Runtime Size: 96 kB
	ROM Size: 64 kB
	Characteristics:
		BIOS characteristics not supported
		Targeted content distribution is supported

Step 4: Memory inventory

The memory query is the one most people actually need. It shows total capacity, populated and empty DIMM slots, speed, type, and on real hardware the manufacturer and serial number of each stick:

sudo dmidecode -t memory

The output leads with the physical memory array (the umbrella for all DIMMs) and then lists every slot:

Handle 0x1000, DMI type 16, 23 bytes
Physical Memory Array
	Location: Other
	Use: System Memory
	Error Correction Type: Multi-bit ECC
	Maximum Capacity: 2 GB
	Error Information Handle: Not Provided
	Number Of Devices: 1

Handle 0x1100, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x1000
	Error Information Handle: Not Provided
	Total Width: Unknown
	Data Width: Unknown
	Size: 2 GB
	Form Factor: DIMM
	Set: None
	Locator: DIMM 0
	Bank Locator: Not Specified
	Type: RAM

On real hardware the Type field will be DDR4 or DDR5, Speed will be the clocked speed like 3200 MT/s, and Manufacturer/Part Number/Serial Number will identify the specific stick. If you’re planning a RAM upgrade, this is where you look first to see which slots are populated and at what speed.

Step 5: Processor details

The processor query returns one block per physical socket. Even on a single-socket workstation this is the cleanest way to see the exact CPU model and its reported maximum clock:

sudo dmidecode -t processor

Shows socket count, family, model, cores per socket, thread count, and max clock:

Processor Information
	Socket Designation: CPU 0
	Type: Central Processor
	Family: Other
	Manufacturer: QEMU
	ID: 61 0F 00 00 FF FB 8B 07
	Version: pc-i440fx-9.2
	Voltage: Unknown
	External Clock: Unknown
	Max Speed: 2000 MHz

On physical hardware, Version will be the exact CPU model string (e.g. Intel(R) Xeon(R) Silver 4314 CPU @ 2.40GHz) and Max Speed / Current Speed will differ if you’re tracking turbo frequencies.

Step 6: System serial and UUID

For asset management, the serial number and UUID are the two fields that uniquely identify the box:

sudo dmidecode -s system-serial-number
sudo dmidecode -s system-uuid

The serial is baked into the chassis at the factory and won’t change over the life of the machine. The UUID is assigned at manufacturing time and is the field most asset databases (including Puppet’s Facter, Ansible’s ansible_product_uuid, and the SolarWinds agent) use to tie a host to a record.

Step 7: Dump everything to a file

For archival or to ship to a vendor’s support portal, dump the full report. It’s 15-30 KB of text on a typical server:

sudo dmidecode > "hardware-$(hostname)-$(date +%F).txt"
ls -la hardware-*.txt

Store this alongside your other inventory documentation. The next person who logs into the box will thank you for it, and it’s a clean record for warranty claims if a DIMM dies.

Step 8: Scripting around dmidecode

The -s form is perfect for scripts because it returns exactly one line. A simple check that a server is running the minimum required BIOS version:

MIN_BIOS="2.10"
CUR_BIOS=$(sudo dmidecode -s bios-version)
if printf '%s\n%s\n' "$MIN_BIOS" "$CUR_BIOS" | sort -V | head -1 | grep -q "^$MIN_BIOS$"; then
  echo "BIOS $CUR_BIOS is current"
else
  echo "BIOS update required: have $CUR_BIOS, need $MIN_BIOS"
fi

Ansible’s setup module also reads most of these fields and exposes them as ansible_bios_version, ansible_product_name, ansible_product_serial, and ansible_memtotal_mb. For individual investigations the command line is faster, but for fleet-wide inventory your config management tool is already doing the collection for you.

dmidecode reads firmware tables, but for kernel-visible hardware you want other tools too:

  • lscpu: CPU topology from the kernel, including cache sizes
  • lsmem: online memory blocks
  • lspci: all PCI devices (GPUs, NICs, NVMe controllers)
  • lsblk: block devices and mount points
  • lshw: kernel-level hardware tree (install it with apt install lshw or dnf install lshw)

For a full sysadmin toolkit on a fresh server, start with our Rocky Linux 10 post-install tips or the equivalent Ubuntu 22.04 to 24.04 upgrade guide. If the hardware inventory is feeding a config management stack, see our systemctl reference for the other side of the coin: runtime service state. For workloads that will actually stress the hardware you just inventoried, Apache Spark is a good benchmark.

Related Articles

Ubuntu Install XAMPP on Ubuntu 24.04 / 22.04 (All PHP Editions) AlmaLinux Build Open vSwitch from Source on Rocky / AlmaLinux / RHEL AlmaLinux Host ASP.NET Application on Rocky / CentOS / AlmaLinux with Apache AlmaLinux Run LXC/Incus Containers on Rocky Linux 10 / AlmaLinux 10

Leave a Comment

Press ESC to close