HowTo: Check RAM Size In Ubuntu Linux

How do I check amount of RAM in my Ubuntu Linux laptop or desktop system/server using GUI and command line tools?

There are various commands on Ubuntu Linux that can show you total RAM, used and free ram as follows:

  • free command
  • top command
  • vmstat command
  • /proc/meminfo file.

Display available memory on Ubuntu Linux

Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following commands to view amount of free and used memory in the system including total ram:

free -m

Sample outputs:

             total       used       free     shared    buffers     cached
Mem:          7997       2618       5378          0        126       1353
-/+ buffers/cache:       1139       6858
Swap:        15623          0      15623

You can also use the following command to get same info:

grep MemTotal /proc/meminfo

Sample outputs:

MemTotal:        8189496 kB

The above output indicates that I’ve total 8GiB ram. You can get detailed info by typing the following cat command:
$ cat /proc/meminfo
Sample outputs:

MemTotal:        2050424 kB
MemFree:          649088 kB
Buffers:          304844 kB
Cached:           920136 kB
SwapCached:            4 kB
Active:           803628 kB
Inactive:         431560 kB
Active(anon):       3988 kB
Inactive(anon):     8628 kB
Active(file):     799640 kB
Inactive(file):   422932 kB
Unevictable:        2944 kB
Mlocked:            2944 kB
SwapTotal:       3998716 kB
SwapFree:        3998712 kB
Dirty:                20 kB
Writeback:             0 kB
AnonPages:         13296 kB
Mapped:            10364 kB
Shmem:               336 kB
Slab:             118192 kB
SReclaimable:     101820 kB
SUnreclaim:        16372 kB
KernelStack:        1240 kB
PageTables:         1740 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     5023928 kB
Committed_AS:      67748 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       30748 kB
VmallocChunk:   34359698708 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       52096 kB
DirectMap2M:     2043904 kB

Other commands

You can use other commands to get the same info:
$ vmstat
$ top
### you need to install htop ##
$ htop

This tutorial is also available in a quick video format:

GUI Tool To Find Out RAM Size Under Ubuntu Linux

The System Monitor application enables you to display basic system information and monitor system processes, usage of system resources, and file systems. You can also use System Monitor to modify the behavior of your system. To see memory information graphically, click on System > Administration > System monitor:

Fig.01: Ubuntu Linux Display Installed Memory

A note about 3GB ram problem

If your Linux based system only shows 3 GB ram (it may be in the 2.9–3.5 GB range) even if you got more than 3GB installed. You can get around this barrier running on x86 microprocessors by following this tutorial. The barrier can be resolved by moving to a 64-bit processor and operating system. On certain x86 hardware, it is possible to resolve it by using physical address extension (PAE) mode on x86.

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts