
To display the memory sizes in mebibyte (MiB) format, use the -m option:
#Linux get free memory how to
The following examples show you how to use free with these options to represent output in an easy to interpret format. The free command offers various options to check how much memory is available, free, and in use. Swap is located in the hard drive and thus it is considerably slower than the physical memory. Swap can help systems with lower physical memory, but it is not a replacement for RAM.
When entire RAM is used and your system needs more resources, then inactive memory pages are moved to swap. Swap in Linux is used when total physical memory is used.
Here, the available memory is almost 2946 MiB and 2.87 GiB.įor swap memory, only the total, used, and free amount of memory is displayed.
available - displays available memory size that is usable by new applications, but this size does not include swap memory. buff/cache - displays buffered (memory used by Kernel buffers) and cached (memory used by page cache) memory sizes that is not currently in use, but is available for later use. Here, the total shared memory is almost 14 MiB. shared - displays the shared amount of memory that is used by multiple processes and applications. Here, free memory is 1933808 KiB which is almost 1888 MiB and 1.84 GiB. free - displays free amount of memory that can be used by your system and other applications. Here, total used memory is 757028 KiB which is almost 740 MiB and. used - displays the total amount of memory that is currently in use by your system and running applications. Here, the total physical amount of memory is 4020192 KiB which is almost 3925 MiB and 4 GiB. total - displays the total amount of memory installed on the system and total swap allocated during installation. Now let’s understand what these separate columns (headers) mean: When the free command is used without any options, the free command shows the amount of memory in kibibyte format. The second line shows the memory (RAM) statistics and the following line shows the swap information ( in 3 columns).