Close Menu
    Facebook X (Twitter) Instagram
    • About
    • Privacy Policy
    • Write For Us
    • Newsletter
    • Contact
    Instagram
    About ChromebooksAbout Chromebooks
    • Linux
    • News
      • Stats
      • Reviews
    • AI
    • How to
      • DevOps
      • IP Address
    • Apps
    • Business
    • Q&A
      • Opinion
    • Gaming
      • Google Games
    • Blog
    • Podcast
    • Contact
    About ChromebooksAbout Chromebooks
    Linux

    How to check RAM in Linux?

    Dominic ReignsBy Dominic ReignsJanuary 5, 2026Updated:January 5, 2026No Comments3 Mins Read

    Determine system RAM without physical inspection using command line tools. This method works for scripting and remote system administration when memory capacity is unknown.

    Requirements

    • Linux system with terminal access
    • Basic command line knowledge
    • Root privileges for certain commands

    Check RAM in Linux

    Using the free Command

    Run the following command to display memory usage:

    $ free -h

    The output shows total, used, and available memory:

                  total        used        free      shared  buff/cache   available
    Mem:           15Gi       2.1Gi       10Gi       421Mi       3.2Gi        12Gi
    Swap:            0B          0B          0B

    The total column displays installed RAM. Use -m for megabytes or -g for gigabytes.

    Tip: Add -w flag to separate buffers and cache into distinct columns for detailed analysis.

    Using /proc/meminfo

    Read memory information directly from the system file:

    $ grep MemTotal /proc/meminfo

    The command returns:

    MemTotal:       16384000 kB

    This value represents total physical memory in kilobytes.

    Note: The /proc/meminfo file contains real-time system statistics and updates dynamically.

    Using vmstat Command

    Display memory statistics with vmstat:

    $ vmstat -s

    Find the total memory line in the output:

          16384000 K total memory
           2195456 K used memory
           3276800 K active memory

    Extract only total memory with grep:

    $ vmstat -s | grep 'total memory'

    Using top Command

    Launch the interactive process viewer:

    $ top

    View memory statistics in the header section:

    MiB Mem :  16000.0 total,  10234.5 free,   2100.3 used,   3665.2 buff/cache

    Press q to exit top.

    Tip: Press E in top to cycle through memory unit displays (KiB, MiB, GiB, TiB).

    Using dmidecode Command

    Access detailed hardware information with root privileges:

    # dmidecode -t memory | grep Size

    The output displays physical memory module details:

    Size: 8192 MB
    Size: 8192 MB
    Size: No Module Installed
    Size: No Module Installed

    This shows installed RAM modules and empty slots.

    Warning: The dmidecode command requires root access. Use sudo if not logged in as root.

    Using lshw Command

    Generate comprehensive hardware information:

    # lshw -short -C memory

    View memory class devices and capacity:

    H/W path           Device      Class       Description
    ======================================================
    /0/0                           memory      64KiB BIOS
    /0/1                           memory      16GiB System Memory
    /0/1/0                         memory      8GiB DIMM DDR4 2400 MHz
    /0/1/1                         memory      8GiB DIMM DDR4 2400 MHz

    Filter for system memory total:

    # lshw -C memory | grep size

    Comparing RAM Check Methods

    Command Detail Level Root Required Best For
    free Basic No Quick memory check
    /proc/meminfo Detailed No Scripting and automation
    vmstat Moderate No Memory statistics
    top Real-time No Live monitoring
    dmidecode Hardware Yes Physical module info
    lshw Hardware Yes Complete hardware scan

    FAQS

    Use free -h or cat /proc/meminfo commands. Both display total RAM without requiring root privileges for system administration.

    Run free -h for immediate results. The command displays total memory in human-readable format within seconds across all distributions.

    Execute sudo dmidecode -t memory to view detailed information about installed RAM modules including size, speed, and slot configuration.

    No, free only displays memory capacity and usage. Use dmidecode or lshw commands to check RAM speed and type.

    Use top or htop commands for real-time monitoring. Both update memory statistics automatically and display process-level RAM consumption continuously.

    Dominic Reigns
    • Website
    • Instagram

    As a senior analyst, I benchmark and review gadgets and PC components, including desktop processors, GPUs, monitors, and storage solutions on Aboutchromebooks.com. Outside of work, I enjoy skating and putting my culinary training to use by cooking for friends.

    Best of AI

    Turn Photos to Videos: A Product Marketing Playbook

    August 18, 2026

    DeepSeek Statistics 2026: Users, Token Share, Pricing and Benchmark Data

    August 15, 2026

    Cursor AI Statistics 2026

    August 14, 2026

    AI Hardware Market Share Statistics 2026

    August 12, 2026

    AI Startup Funding Statistics by Region Statistics 2026

    August 7, 2026
    Trending Stats

    Two-Factor Authentication Adoption Statistics 2026

    August 15, 2026

    Chromebook Detachable VS Clamshell Sales Statistics 2026

    August 13, 2026

    MacOS Version Distribution And Demographics Statistics 2026

    August 5, 2026

    Small Language Model Adoption Statistics 2026

    August 3, 2026

    Linux Distribution Popularity Statistics 2026

    August 3, 2026
    • About
    • Tech Guest Post
    • Contact
    • Privacy Policy
    • Sitemap
    © 2026 About Chrome Books. All rights reserved.

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