5 ways to check how much RAM is installed and used in CentOS 8

System engineers often need to check memory statistics in their daily tasks. In this article, we will discuss how you can check how much RAM is installed on your CentOS 8 system using the command line.

The following commands are used to check the RAM of the installed system on CentOS 8.

  1. Using / proc / meminfo
  2. Using a free command
  3. Using top command
  4. Using the vmstat Command
  5. Using the dmidecode Command

Using the meminfo File

Open a terminal window on your system using the keyboard shortcut “Ctrl + Alt + t”. Enter the following command in the terminal to view the installed RAM in your system:

$ cat /proc/meminfo

In the above output, you can see the memory of your system. ‘Cat’ is used to merge files.

Using a free command

To check the total amount of free memory, physical use and swapping memory, you will use the free command. The free command is also used to display information about the buffers used by the kernel and the specifications of your system’s RAM. Enter the following command to check system memory:

$ free -m -h

You can use various options with the “free” command to view system memory information. The general syntax is as follows:

$ free [options]

Check memory usage with free command

Free Command Line Options

Details of a more free team are given below:

-Help used to display help

-b,-k,-m, and -g displays output in kilobytes, megabytes or gigabytes

-l display detailed view of low and high memory statistics

-about use for old format (cache line / no – / + buffers /)

-t shows the total for RAM + swap

-s use to update delay

-from use to update counter

-V use to display version and release information

Using top command

The top command is used to display memory and buffer information. You run the command below on your system to view memory information.

$ top

Get memory usage with the top command

Using the vmstat Command

The vmstat command is used to display memory statistics, in which the user can view some additional information related to processes, I / O locks, interrupts, paging, and CPU activity. Use the following command to print memory statistics:

$ vmstat


$ vmstat -s

Use the vmstat command

Using the dmidecode Command

The dmidecode command is used to display the contents of the SMBIOS table in a human-readable format. This table contains all the information related to the hardware components of the system, as well as a description of the serial number, as well as the BIOS version. The basic syntax for the dmidecode command is as follows:

$ dmidecode --type memory

Using lshw command

The following command is used to view memory information:

$ sudo lshw -short -C memory

Use the lshw command to get detailed memory usage information.


In this article, we learned how to check system memory on CentOS 8.0 using the command line. I hope you really enjoyed this tutorial and it will be useful to you. If you have any problems related to the above commands, please let us know in the comment box.

5 ways to check how much RAM is installed and used in CentOS 8