How To Check Available Memory In Ubuntu 22.04 LTS

How To Check Available Memory In Ubuntu 22.04 LTS

How To Check Available Memory In Ubuntu 22.04 LTS

In this article, we will explain how you can check the available memory in Ubuntu. For this, we will take the help of various tools or commands.

How To Check Available Memory In Ubuntu 22.04 LTS

Method 1:

The vmstat command

Run the following command to know the memory statistics in your Ubuntu. You can view the free memory and the free swap memory entry in the output, indicating the available memory in your system. The s flag in the below command provides detailed statistics about memory usage.

$ vmstat -s

Method 2:

free command

Free command in Linux is used to check information about the RAM usage by Ubuntu or your distro. m flag in the below command means that the information will be displayed in MBs.

$ free -m

Method 3:

The top command

The top command is used to print CPU and memory usage in Linux.

$ top

Method 4:

The /proc/meminfo command

The /proc/meminfo command extracts memory-related information from the /proc file system.

$ cat /proc/meminfo

Method 5:

The htop command

htop is popular tool that is used to analysis the CPU usage and the memory usage in Linux based operating system. Some of the Linux comes up with the htop by default but if you haven’t installed it then run the following command to install htop on Ubuntu:

$ sudo apt-get update
$ sudo apt install htop

Once htop is installed, run the following command to display the memory and cpu usage of your Ubuntu.

$ htop
READ More Relevant Stuff:  How To Fix No route to host SSH Error In Linux [Solved]

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply

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