How to Check Memory in Linux

Photo of author

By Oluwaseun Bamisile

Published

Do you want to check the memory usage and information of your Linux computer? This guide includes numerous ways to accomplish that.

Option 1: Check Memory Through the System Monitor

One way to check the memory on your Linux PC is through the system monitor application in the GUI. In order to achieve that, follow the procedures as well as the screenshot images below.

  1. Click the Show applications icon on the taskbar.
  1. Then, type “system monitor” (without the quotes) in the search field and select the System Monitor app from the search result.
Check Memory In Linux Through System Monitor
  1. When the System Monitor app opens, switch to the Resources tab.
  1. In the Resources tab, you will find real-time information and usage about the memory of your Linux computer under Memory and Swap.
Check Memory In Linux Through System Monitor

Option 2: Check Memory via the Terminal

You can also check memory information on your Linux computer by running certain commands in the terminal. Moreover, there are various commands to view memory information in the Linux terminal.

Well, you will learn how to use these commands in the sub-sections below. However, before that, you first need to learn how to open the terminal in Linux.

To open the terminal in Linux, right-click any free area on your desktop and select Open in Terminal from the displayed options. Alternatively, use the Ctrl + Alt + T keyboard shortcut to launch the terminal in Linux.

Check Memory In Linux Via Terminal

After successfully opening the terminal in Linux, use the commands in the sub-sections below to view the memory information.

Method 1: Check Memory Using the Top Command

The top command tool gives a summary of all processes running on your Linux computer, including real-time memory information and usage. To use this tool, execute the subsequent command below in your Linux terminal – you will see the memory information opposite MiB Mem.

top

Method 2: Check Memory Using the Free Command

The free command tool is another tool you can use to check the real-time memory information of your Linux computer through the terminal. To achieve that, execute the command below – you will find the memory information opposite Mem.

free
The memory details are measured in kibibytes.
Check Memory In Linux Via Terminal

Method 3: Check Memory Using the Htop Command

You can also check the memory information of your Linux computer through the terminal using the htop command tool. This command tool provides an easier-to-read environment and memory information in real-time.

To use this tool, input the command below and press the enter key on your keyboard.

htop
Real-time information about the memory can be seen in the Mem box.

In some cases, when you run the aforementioned htop command, you might get an error saying the command cannot be found. That’s because the tool doesn’t come with your Linux distribution by default.

Check Memory In Linux Via Terminal

However, follow the procedures below to install the htop command tool on your Linux computer.

  1. Input the command below on your Linux terminal and press the enter key. Consequently, you will be prompted to input your system password – do that and press the enter key.
sudo apt-get install htop
Characters won’t be visible while inputting your password
  1. After doing that, Linux will start to install the htop command tool.
Check Memory In Linux Via Terminal

Method 4: Check Memory Using the Proc/meminfo Command

Pretty much all the aforementioned command line tools get their memory report from the proc/meminfo file. Hence, you can simply go through the main source (proc/meminfo file) to get the real-time memory information/usage of your Linux computer.

To access the proc/meminfo file, run the following command in your Linux terminal and press the enter key.

cat /proc/meminfo

Frequently Asked Questions

1. How much memory do I need to install Linux?

To run the Linux operating system smoothly, you need a minimum of 2 GB RAM.

2. Does Ubuntu use less RAM than Windows 11?

Yes, the Ubuntu operating system uses less memory than the Windows 11 operating system.

3. What does Ubuntu mean?

Ubuntu is an old African word that means “humanity to others.” 

4. What is the shortcut to open the terminal in Linux?

The keyboard shortcut to open the terminal in Linux is Ctrl + Alt + T.

5. Is Linux free?

Yes, the Linux OS is a free and open-source operating system.

Conclusion

Memory is one of the most crucial components of a computer. Gladly, this guide demonstrated various methods to check the memory information and real-time usage of a Linux computer.

To give more details, this guide taught us how to perform this task through the system monitor application in the Linux GUI. We also learned how to perform this task by running various command lines in the Linux terminal.

I hope you were able to check the memory information of your Linux computer with the help of this guide. If you were, click on “Yes” beside the “Was this page helpful” question below.

You may also express your thoughts and opinions by using the “Leave a Comment” form at the bottom of this page.

Finally, you can visit our Linux how-to page to get more Linux guides.

About the Author

Photo of author

Oluwaseun Bamisile

Oluwaseun is the Lead Content Editor at Itechguides.com. He holds a National Diploma in Computer Science (currently studying part-time for his Higher National Diploma). An internet geek with a love for automobiles, he writes product reviews, tech articles, and how-to guides on the site.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment