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.

    • Related Articles

    • How to Install cPanel on Your Server or VPS: Updated Guide by Distribution

      cPanel & WHM is the most widely used control panel in the web hosting industry. If you have a dedicated server or VPS with Webzi (or any other provider), this guide shows you how to install cPanel from scratch on the currently supported operating ...
    • Basic SSH commands

      FILE MANAGEMENT Copy file cp -a archivo.zip archivocopia.zip Create a 404.html file touch /home/usuario/public_html/404.html Compress directory zip -r archivo.zip /home/usuario/public_html/directorio Extract file unzip archivo.zip View contents of a ...
    • 'Never Finished' error in JetBackup 5

      The "Never Finished" error in JetBackup happens when a backup job doesn’t complete properly, leaving the process stuck in a "never finished" state. This issue can pop up for a bunch of reasons, like JetBackup services acting up, cache problems, or ...
    • How to Use Telnet to Test SMTP Connectivity on Port 25

      Telnet is a networking tool that allows you to test connectivity with services on other servers. By using it on port 25, you can verify whether your server is communicating correctly with an SMTP mail server, which is essential for diagnosing email ...
    • Fix: Service Unavailable Error on CloudLinux Servers

      The "Service Unavailable" error is one of the most common issues on shared hosting servers running CloudLinux with CageFS and mod_lsapi. This error indicates that the server could not process the visitor's request, usually because the PHP backend ...