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
    Share
    Facebook Twitter LinkedIn Pinterest

    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.

    Share. Facebook Twitter Pinterest LinkedIn Tumblr
    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.

    Related Posts

    How to Restart NGINX on Your Linux Server

    January 30, 2026

    How To Install NPM Linux

    January 26, 2026

    How To Check Linux List Processes

    January 24, 2026

    Comments are closed.

    Best of AI

    Gramhir AI Statistics 2026

    February 24, 2026

    Poe AI Statistics 2026

    February 21, 2026

    Joyland AI Statistics And User Trends 2026

    February 21, 2026

    Figgs AI Statistics 2026

    February 19, 2026

    Dopple AI Statistics 2026

    February 17, 2026
    Trending Stats

    Chrome Incognito Mode Statistics 2026

    February 10, 2026

    Google Penalty Recovery Statistics 2026

    January 30, 2026

    Search engine operators Statistics 2026

    January 29, 2026

    Most searched keywords on Google

    January 27, 2026

    Ahrefs Search Engine Statistics 2026

    January 19, 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.