Linux Command - free
The Linux command free displays the memory usage for the system. It shows how much is free and used. It shows space used by buffers and caches. It also shows swap space usage. All info is parsed out of /proc/meminfo.
It is important to note that much free memory is used for caching and buffering. That memory is still available to be used if needed. If you want to know how much memory is actually available, look at available and not free.
Most common usage, shows usage in human readable format:
free -h
You could also just run
free
Using -h will display using these units as appropriate:
B | byte |
Ki | kibibyte |
Mi | mebibyte |
Gi | gibibyte |
Ti | tebibyte |
Pi | pebibyte |
Some Options:
-b | bytes |
-k | kibibytes |
-m | mebibytes |
-g | gibibytes |
–tebi | tebibytes |
–pebi | pebibytes |
–kilo | kilobytes |
–mega | megabytes |
–giga | gigabytes |
–tera | terabytes |
–peta | petabytes |
-h | human readable |
-w | wide mode |
-c | display count times |
-l | low and hi mem stats |
-s | continously display every n seconds |
–si | power of 1000 units ( kilo, mega, giga ) |
-t | show total line |
-v | show comitted/uncommitted and commit limit |
Note:
- Power of 1000 - kilo, mega, giga
- Power of 1024 - kibi, mebi, gibi