Close Menu
    Facebook X (Twitter) Instagram
    Command Linux
    • About
    • How to
      • Q&A
    • OS
      • Windows
      • Arch Linux
    • AI
    • Gaming
      • Easter Eggs
    • Statistics
    • Blog
      • Featured
    • MORE
      • IP Address
      • Man Pages
    • Write For Us
    • Contact
    Command Linux
    Home - How to - How to Check Memory Size in Linux Using Terminal and GUI

    How to Check Memory Size in Linux Using Terminal and GUI

    WillieBy WillieMarch 28, 2026Updated:March 28, 2026No Comments4 Mins Read

    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

    RequirementDetails
    Operating SystemAny Linux distribution
    Utilitiesfree, lshw, GNOME System Monitor
    PermissionsRoot 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
    FlagPurpose
    -gDisplays values in gibibytes
    -hFormats output in human-readable units
    -tAdds 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:

    DistributionInstall Command
    Ubuntu / Debian / Mintsudo apt install gnome-system-monitor
    Fedora / CentOS / AlmaLinux / RHELsudo dnf install gnome-system-monitor
    Arch / Manjarosudo 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.

    Willie
    • Website

    Willie has over 15 years of experience in Linux system administration and DevOps. After managing infrastructure for startups and enterprises alike, he founded Command Linux to share the practical knowledge he wished he had when starting out. He oversees content strategy and contributes guides on server management, automation, and security.

    Related Posts

    How to Prepare a Linux Mint Live USB

    April 17, 2026

    How To Take Screenshot on Linux

    April 15, 2026

    How to Use the Linux Restart Command to Reboot Your Server

    April 15, 2026

    How To Run A Shell Script In Linux

    April 13, 2026
    Top Posts

    Reportbug

    April 15, 2026

    wish

    February 5, 2026

    DIRNAME

    March 11, 2026

    How To Download D3DX9_43.dll and Fix Missing File Error

    February 19, 2026
    • Home
    • Contact Us
    • Privacy Policy
    • Terms of Use

    Type above and press Enter to search. Press Esc to cancel.