/proc/meminfo

The /proc/meminfo file stores statistics about memory usage on the Linux based system. The same file is used by free and other utilities to report the amount of free and used memory (both physical and swap) on the system as well as the shared memory and buffers used by the kernel.

Example:

Use the cat command or grep command to see /proc/meminfo file:

$ cat /proc/meminfo
$ more /proc/meminfo
$ egrep --color 'Mem|Cache|Swap' /proc/meminfo

free command

To display free memory size in MB (megabytes):

$ free -m

Displays a line containing the totals memory in MB:
$ free -t -m

Source : Cyberciti