When upgrading system hardware, diagnosing performance bottlenecks, or tuning server workloads in Ubuntu, knowing the exact physical specifications of your installed RAM is critical. While tools like free or htop display total memory capacity and live usage, they do not reveal hardware-level metrics such as memory clock speed, DDR generation, form factor, or vacant motherboard slots. Using the Desktop Management Interface (DMI) via dmidecode, you can extract comprehensive SMBIOS memory data directly from the Linux command line.
Checking RAM Specifications with dmidecode
The dmidecode utility reads the contents of the DMI table in BIOS/UEFI firmware. Because memory tables reside in protected hardware memory, running dmidecode requires superuser privileges.
To view detailed specifications for all memory devices, open your terminal (Ctrl + Alt + T) and execute:
sudo dmidecode --type memory
To extract only the most essential hardware metrics—such as clock frequency, configured speed, memory type, and physical slot locator—filter the output using grep:
sudo dmidecode --type 17 | grep -E "Locator:|Size:|Type:|Speed:|Configured Memory Speed:|Manufacturer:"
Key fields in the output include:
- Size: Indicates the capacity of the module installed in that slot (e.g.
16 GB) orNo Module Installedif the slot is vacant. - Type: Displays the memory technology (such as
DDR4,DDR5, orLPDDR4). - Speed: Shows the maximum rated clock frequency of the module (e.g.
3200 MT/sor4800 MHz). - Configured Memory Speed: Indicates the actual operating clock speed set by the motherboard chipset or XMP profile.
- Locator: Identifies the physical slot on the motherboard (e.g.
DIMM_A1,DIMM_B1).
Determining Maximum Supported RAM and Available Slots
Before purchasing additional RAM modules, verify how many physical memory slots your motherboard possesses and the maximum capacity it supports. Use DMI type 16 to query the memory array controller:
sudo dmidecode --type 16 | grep -E "Maximum Capacity:|Number Of Devices:"
The Maximum Capacity field reveals the upper limit of RAM the motherboard architecture supports, while Number Of Devices shows the total physical DIMM/SO-DIMM slots present on the motherboard.
Alternative Commands for Quick RAM Auditing
If you need quick summaries without parsing raw DMI tables, Ubuntu provides complementary command-line utilities:
# Quick hardware breakdown via lshw
sudo lshw -short -C memory
# Fast one-line memory summary via inxi (install with: sudo apt install inxi)
inxi -m
Using these terminal commands provides precise hardware information without requiring physical disassembly or third-party graphical benchmarking tools.