• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Check Ram In Ubuntu Through Terminal

How To Check Ram In Ubuntu Through Terminal

By Sourabh / December 28, 2018 Category: How To, Ubuntu

How to check RAM in Ubuntu through terminal. On Ubuntu, check RAM usage via command line. Ubuntu users can also check RAM type using Terminal commands.

Random-access memory (RAM) is a form of computer data storage which stores frequently used program instructions to increase the general speed of a system. A random-access memory device allows data items to be read or written in almost the same amount of time irrespective of the physical location of data inside the memory. In contrast, with other direct-access data storage media such as hard disks, CD-RWs, DVD-RWs and the older drum memory, the time required to read and write data items varies significantly depending on their physical locations on the recording medium, due to mechanical limitations such as media rotation speeds and arm movement.

How to Check RAM Size in Ubuntu

Command 1

grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus (-) is given as file name) for lines containing a match to the given PATTERN. By default, grep prints the matching lines.
MemTotal displays the total usable ram (i.e. physical ram minus a few reserved bits and the kernel binary code.

grep MemTotal /proc/meminfo

Command 2

The /proc/meminfo, one of the files in the /proc/ directory, displays information about the system’s RAM usage. The argument MemTotal shows the total amount of usable RAM, in kibibytes, which is physical RAM minus a number of reserved bits and the kernel binary code.

cat /proc/meminfo

Command 3

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo. The displayed columns are:

total Total installed memory (MemTotal and SwapTotal in /proc/meminfo)
used Used memory (calculated as total – free – buffers – cache)
free Unused memory (MemFree and SwapFree in /proc/meminfo)
shared Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on kernels 2.6.32, displayed as zero if not available)
buffers Memory used by kernel buffers (Buffers in /proc/meminfo)
cache Memory used by the page cache and slabs (Cached and Slab in/proc/meminfo)

Please note that the last two items, cache and buffers, is memory reserved by the kernel.

free -m
free -g
free -k

Command 4

vmstat reports virtual memory statistics. vmstat reports information about processes, memory, paging, block IO, traps, disks and cpu activity. The first report produced gives averages since the last reboot. Additional reports give information on a sampling period of length delay. The process and memory reports are instantaneous in either case.

vmstat

Tags: Check Cpu Ubuntu, Check RAM Size Ubuntu, Check RAM Size Ubuntu Commands, Check Ubuntu RAM Size, Commands To Get Cpu Information, How To Check Hard Disk Size In Ubuntu, How To Check Ram In Linux, How To Check Ram In Ubuntu Through Terminal, How To Check Ram Size In Ubuntu Command, Intel(R) Xeon(R) Cpu E5-2650, Linux Check Cpu Cores, Linux Check Cpu Usage, Linux Command Processor Info, Linux Cpu Load, Linux Memory Info, Lscpu Command Not Found, Ubuntu Check RAM Size, Ubuntu Check Ram Size Command Line, Ubuntu Check Ram Type, Ubuntu Check Ram Usage, Ubuntu Check Ram Usage Command Line, Ubuntu Commands Check RAM Size

Primary Sidebar

Latest Posts

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

© 2025 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap