Linux is one of the most popular open source operating system and comes with huge set of commands. The most important and single way of determining the total available space of the physical memory and swap memory is by using “free” command.
The Linux “free” command gives information about total used and available space of physical memory and swap memory with buffers used by kernel in Linux/Unix like operating systems.
Full article here:
10 ‘free’ Commands to Check Memory Usage in Linux (Tecmint)