How to Check RAM on Ubuntu Linux

This article describes the steps you can take to check the system RAM on Ubuntu Linux.

Knowing the RAM installed on your computer with Ubuntu Linux may come in handy when drawing up requirement specs. Ubuntu Linux comes with many tools that users can use the check available RAM on a machine.

Below, we’ll go through some of the tools that you can use. There are some pros and cons to all of them. However, all should work similarly, except few may provide additional information than others.

With the steps below, you will be able to check the system RAM and gather the following information:

  • RAM size
  • Free RAM
  • Type and speed of RAM

Check RAM size, and speed on Ubuntu Linux

As stated above, knowing the RAM installed on your computer with Ubuntu Linux may come in handy when drawing up requirement specs.

Below are some of the tools to use to check the system RAM on Ubuntu Linux.

Ubuntu Linux has a centralized location for the majority of its settings. From system configurations to creating new users and updating, all can be done from the System Settings panel.

To get to System Settings, open the Activities overview and start typing Settings.

ubuntu Linux activities overview search box

Alternatively, click on the System menu at the top-right corner of the top bar on your desktop.

On the System menu, select Settings as highlighted below.

ubuntu linux system menu settings button
ubuntu Linux system menu settings button

In the Settings app, scroll down the menu items on the left and click on the About tile

Ubuntu Linux Settings About tile
Ubuntu Linux Settings About tile

On the System Settings -> About settings panel, locate the Memory line and see the memory installed on the system.

ubuntu linux about system ram
Ubuntu Linux about system ram

Check system memory using the command line

On Ubuntu Linux, users can use the terminal to view details of the system RAM. Commands such as free, watch, top, and dmidecode can be used to display more information.

You can use the free command with the -h command option to display the amount of free and used memory (RAM) in the system.


free -h

The commands should output similar lines as below:

               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       1.4Gi       113Mi        20Mi       440Mi       383Mi
Swap:          2.1Gi       109Mi       2.0Gi

Using the watch with the free command gives you live RAM information that refreshes every 2 seconds.

watch free

Another useful command to display stem RAM is the top command.


By default, the top command output is sorted by CPU consumption. You can press Shift+M to sort it by memory.

ubuntu linux with top command to show memory
Ubuntu Linux with the top command to show memory

For more details, RAM information, including RAM types, and slots used, use the commands below.

sudo dmidecode --type memory

The command should output similar lines to the one below.

# dmidecode 3.4
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0096, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: None
	Maximum Capacity: 3 GB
	Error Information Handle: Not Provided
	Number Of Devices: 64

Handle 0x0097, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0096
	Error Information Handle: No Error
	Total Width: 64 bits
	Data Width: 64 bits
	Size: 2 GB
	Form Factor: DIMM
	Set: None
	Locator: RAM slot #0
	Bank Locator: RAM slot #0
	Type: DRAM
	Type Detail: Synchronous
	Speed: Unknown
	Manufacturer: VMware Virtual RAM
	Serial Number: 00000001
	Asset Tag: Not Specified
	Part Number: VMW-2048MB
	Rank: Unknown
	Configured Memory Speed: 4800 MT/s
	Minimum Voltage: 1.2 V
	Maximum Voltage: 1.2 V

That should do it!


This post showed you how to check and display RAM details on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.