You don’t need to open your computer case or enter BIOS settings to find out how much RAM your machine has. Linux lets you check the memory size right from the operating system — without rebooting or installing any third-party software. The methods below cover the terminal and GUI, work across distributions, and take seconds to run.
What You Need Before Checking Memory Size in Linux
| Requirement | Details |
|---|---|
| Operating System | Any Linux distribution |
| Utilities | free, lshw, GNOME System Monitor |
| Permissions | Root or sudo access (required for lshw) |
How to Check Memory Size in Linux Using the Terminal
The command line is the fastest way to check RAM on any Linux system. Three utilities cover different levels of detail — from a quick overview to slot-by-slot hardware specs.
Using the free Command to Check RAM Size
The free command reports current RAM consumption and breaks down how memory is distributed across your system. It also shows the total amount of physical memory installed. Run it with these flags for the clearest output:
$ free -ght
| Flag | Purpose |
|---|---|
-g | Displays values in gibibytes |
-h | Formats output in human-readable units |
-t | Adds a totals row at the bottom |
Look at the Mem: row of the output. The first column shows your total installed RAM. The Swap: row refers to disk-based virtual memory — not physical hardware — so ignore it when confirming installed RAM.
The chart below illustrates a typical memory breakdown from free -h on a system with 16 GB of RAM:
Example free -h output: 16 GB system with typical usage distribution
Reading /proc/meminfo for Detailed Memory Stats
The /proc/meminfo file holds detailed data about your system’s RAM. Most utilities — including free — pull their figures from this same source. View it with:
$ less /proc/meminfo
The first line, MemTotal, reports total physical memory. Scrolling down reveals MemFree, MemAvailable, Buffers, Cached, and swap values. MemAvailable is more useful than MemFree when assessing how much RAM new processes can actually use.
This file is a virtual file — it contains no stored data on disk. The kernel writes it in real time, so values reflect the current system state at the moment you read it.
Running lshw to Check RAM Slots and Speed
The lshw utility goes further than free or /proc/meminfo. It detects the number of occupied RAM slots, module speed in MHz, and individual stick sizes — details that matter when you want to know whether your system has room for an upgrade. Root privileges are required:
$ sudo lshw -C memory -short
The output lists each memory device separately, showing its size, speed, and physical slot location. If a process is consuming excessive RAM and you need to terminate it by name, that’s a separate step after confirming your available memory.
How to Check Linux Memory Size with a GUI Tool
If you prefer a graphical approach, GNOME System Monitor is a reliable option. It comes pre-installed on GNOME desktops. On other desktop environments, install it through your package manager:
| Distribution | Install Command |
|---|---|
| Ubuntu / Debian / Mint | sudo apt install gnome-system-monitor |
| Fedora / CentOS / AlmaLinux / RHEL | sudo dnf install gnome-system-monitor |
| Arch / Manjaro | sudo pacman -S gnome-system-monitor |
After installation, open the application from your Activities menu or app launcher. Click the Resources tab at the top. Total physical RAM appears on screen alongside a live usage graph.
When installing packages across distros, version availability can vary. If you need a specific release of gnome-system-monitor, the process of pinning an exact apt package version keeps your environment consistent.
The bar chart below compares how each method presents RAM data:
Comparison of detail level across the three methods
FAQs
How do I check memory size in Linux from the terminal?
Run free -ght for a quick overview. The Mem: row shows total installed RAM in the first column. For slot-level details, run sudo lshw -C memory -short.
What is the difference between MemFree and MemAvailable in /proc/meminfo?
MemFree is completely unused memory. MemAvailable estimates how much RAM new applications can use — it includes reclaimable buffers and cache, giving a more accurate picture.
Why does Linux show less RAM than physically installed?
The kernel, firmware, and hardware devices reserve a small portion of physical memory. This is expected behavior. The reported total will be slightly lower than the labeled capacity of your RAM sticks.
Do I need root access to check RAM in Linux?
Not for most methods. free and /proc/meminfo work as a regular user. The lshw -C memory command requires sudo to access full hardware details including slot and speed information.
Can I check memory size in Linux without installing anything?
Yes. The free command and /proc/meminfo file are present on every Linux distribution by default. No additional packages are needed to check installed RAM from the terminal.