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
- SSH access to the server with root or sudo privileges.
- Some commands require packages that are not preinstalled. Install them with:
dnf install lshw smartmontools -y
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
lshw -short — General hardware summary.dmidecode -t system — Motherboard, manufacturer, and serial.dmidecode -t bios — BIOS information.lscpu — Processor, cores, and threads.free -h — RAM and swap usage.dmidecode -t memory — Physical RAM modules.lsblk — Disks and partitions (quick view).fdisk -l — Disks and partitions (detailed).df -h — Used/available space per partition.smartctl -H /dev/sda — Disk health.ip a — Network interfaces.lspci — PCI devices.lsusb — USB devices.cat /etc/os-release — Operating system version.uname -r — Kernel version.
Recommendations
- Document the hardware specifications of each server in a centralized location. This speeds up troubleshooting and facilitates communication with hardware providers.
- Periodically check disk health with
smartctl to detect failures before they occur. - 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.
- The
ifconfig command is no longer preinstalled on AlmaLinux and modern RHEL-based distributions. Use ip a as a replacement.