On a Linux machine, you can use the free command to display how much free memory you have. The -m option displays all values in megabytes
$ free -m total used free shared buffers cached Mem: 2010 1418 591 0 61 1093 -/+ buffers/cache: 263 1746 Swap: 2047 0 2047
The Mem: line above reports usage statistics for physical RAM. At first glance, you may assume this machine has 591 MB of free RAM. Not true.
The cached column reports how much memory the kernel has consumed caching data read from slower data sources, such as disks and the network. Most of this memory will be automatically freed and handed over to applications if they request memory, so the second line of the output, which reports memory statistics ignoring the cache, is a better measure of the machine’s free resources. This machine has roughly 1746 MB free, or approximately 1.7 GB.