How to Get Server Hardware Information on AlmaLinux

How to Get Server Hardware Information on AlmaLinux

Knowing the hardware specifications of your dedicated server or VPS is essential for making informed decisions about resource sizing, diagnosing performance issues, and planning future upgrades.

In this article, you will learn how to obtain detailed hardware information from your server using the command line on AlmaLinux. All commands are compatible with any RHEL-based distribution (AlmaLinux, Rocky Linux, CloudLinux, etc.).

Prerequisites

  1. SSH access to the server with root or sudo privileges.
  2. Some commands require packages that are not preinstalled. Install them with:
dnf install lshw smartmontools -y

General hardware information

To get a complete summary of all server hardware (CPU, memory, disks, network, etc.):

lshw -short

The -short option displays the information in a summarized table format. If you want the full detailed report:

lshw

Motherboard, BIOS, and serial numbers

The dmidecode command reads SMBIOS/DMI information and allows you to check manufacturer, model, BIOS, and serial number data:

dmidecode -t system

To check BIOS-specific information:

dmidecode -t bios

To get the server serial number (useful for support tickets with the hardware provider):

dmidecode -s system-serial-number

Processor (CPU)

To get detailed processor information, including model, cores, threads, architecture, and cache:

lscpu

To quickly see only the processor model:

grep "model name" /proc/cpuinfo | head -1

Memory (RAM)

To see the current RAM and swap usage in a human-readable format:

free -h

To get physical information about installed RAM modules (type, speed, slots):

dmidecode -t memory

Disks and partitions

For a quick and clean view of disks, partitions, and mount points:

lsblk

For more detailed information about partitions and partition tables:

fdisk -l

To see used and available space on each mounted partition:

df -h

Disk health (S.M.A.R.T.)

To check the health status of a specific disk (requires smartmontools):

smartctl -a /dev/sda

For a quick health-only result:

smartctl -H /dev/sda

Note: Replace /dev/sda with the disk you want to check. You can identify your disks with lsblk.

Network interfaces

To see all network interfaces, their IP addresses, and status:

ip a

To see link speed information for a specific network interface:

ethtool eth0

Note: Replace eth0 with your network interface name. You can identify it with ip a.

PCI and USB devices

To list all PCI devices (RAID controllers, network cards, GPUs, etc.):

lspci

To list USB devices connected to the server:

lsusb

Operating system and kernel

To confirm the operating system version:

cat /etc/os-release

To see the kernel version:

uname -r

To see the server uptime and load average:

uptime

Quick command reference

  1. lshw -short — General hardware summary.
  2. dmidecode -t system — Motherboard, manufacturer, and serial.
  3. dmidecode -t bios — BIOS information.
  4. lscpu — Processor, cores, and threads.
  5. free -h — RAM and swap usage.
  6. dmidecode -t memory — Physical RAM modules.
  7. lsblk — Disks and partitions (quick view).
  8. fdisk -l — Disks and partitions (detailed).
  9. df -h — Used/available space per partition.
  10. smartctl -H /dev/sda — Disk health.
  11. ip a — Network interfaces.
  12. lspci — PCI devices.
  13. lsusb — USB devices.
  14. cat /etc/os-release — Operating system version.
  15. uname -r — Kernel version.

Recommendations

  1. Document the hardware specifications of each server in a centralized location. This speeds up troubleshooting and facilitates communication with hardware providers.
  2. Periodically check disk health with smartctl to detect failures before they occur.
  3. If running these commands on a VPS, some physical hardware data (such as serial number, motherboard, or BIOS) may not be available or may show hypervisor information instead of actual hardware.
  4. The ifconfig command is no longer preinstalled on AlmaLinux and modern RHEL-based distributions. Use ip a as a replacement.