Which language do you prefer? English 简体中文 繁体中文
...

Part of Linux Commands Cheat Sheet

Display amount of free and used memory in the system.


free

Sample output:


              total        used        free      shared  buff/cache   available
Mem:        3875736     1616308      434336       35196     1825092     2061392
Swap:             0           0           0

Display amount in human friendly format


free -h

Display the amount of memory in other units


free -b # in bytes
free --kibi # in kibibytes (2^10), default
free --mebi # in mebibytes (2^20)
free --gibi # in gibibytes (2^30)
free -k # --kibi
free -m # --mebi
free -g # --gibi
free --kilo # in kilobytes (10^3)
free --mega # in megabytes (10^6)
free --giga # in gigabytes (10^9)
free --tera # in terabytes (10^12)
free --peta # in petabytes (10^15)

References

free(1) — Linux manual page

wbswjc-blog