Linux: Get List of available RAM

One of the most popular commands to check your RAM on Linux is to use the free command:

               total        used        free      shared  buff/cache   available
Mem:         1952708      622020      423180        3196      907508     1184204
Swap:        1048576           0     1048576

or, in case you are a human, use free -h. It’s interesting the defaults are ugly.

               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       607Mi       413Mi       3.0Mi       886Mi       1.1Gi
Swap:          1.0Gi          0B       1.0Gi

You can also periodically refresh readings using the -s option, i.e. refresh every 2 seconds - free -h -s 2.

Another way to check the available RAM is by using the /proc/meminfo file. This file contains real-time information about the systems memory usage, as well as the buffers and shared memory used by the kernel. You can view this file by using the cat or less command, like this:

$ cat /proc/meminfo

To contact me, send an email anytime or leave a comment below.