free command in Linux displays the summary of RAM usage. It shows the information about the total amount of used, free, swap and buffers memory. In this tutorial, you will learn about free command in Linux/Unix and uses of free command with examples.
Syntax of free command
free [OPTIONS]
Options available with free command
To know the options available with free command, Use the command free --help
- -b, –bytes
- –kilo
- –mega
- –giga
- –tera
- –peta
- -k, –kibi
- -m, –mebi
- -g, –gibi
- –tebi
- –pebi
- -h, –human
- –si
- -l, –lohi
- t, –total
- -s N, –seconds N
- -c N, –count N
- -w, –wide
- –help
- -v, –version
free --help
Display the RAM uses information in kibibyte (kiB)
free command without any argument displays the summary of RAM usage in kiB.
free
Understand the output of free command
Mem:
Swap:
total:
used:
free:
shared:
buff/cache:
available:
Display RAM usage in human readable format
free -h
Display Memory usage in Megabytes
free -m
Display Memory usage in Bytes
free -b
Display Memory usage in Kilobytes
free -k
Display Memory usage in Gigabytes
free -g
Display the total of RAM + Swap
free -t
Display memory usage at fixed interval of time
Use CTRL+C for exit
free -s 3
Display memory usage at fixed interval of time
free -s 3 -c 4
A |
adduser | addgroup | alias | anacron | apt | aptitude | arp | at | atq | atrm | awk |
B |
basename | banner | batch | bc | bg | bzip |
C |
cat | cal | cd | chgrp | chown | cksum | chmod | clear | cmp | comm | cp |
D |
date | dd | df | diff | dir | dmidecode | du |
E |
echo | eject | env | exit | expr |
F |
factor | find | free |
G |
grep | groups | gunzip | gzip |
H |
head | history | hostname | hostnamectl | htop | hwclock | hwinfo |
I |
id | ifconfig | ionice | iostat | ip | iptables | iw | iwlist |
J |
K |
kill | kmod |
L |
last | less | ln | locate | login | lp | ls | lshw | lscpu | lsof | lsusb |
M |
man | mdsum | mkdir | more| mv |
N |
nano | nc | neofetch | netcat | netstat | nice | nmap | nproc |
O |
openssl |
P |
passwd | pidof | ping | pr | ps | pwd | pstree |
Q |
R |
rdiff-backup | reboot | rename | rm | rmdir | rnmod |
S |
scp | shred | shutdown | sleep | sort | split | ssh | stat | su | sudo | sum |
T |
tac | tail | talk | tar | tee | time | tree | top | touch | tr |
U |
unalias | uname | uniq | unzip | uptime | users |
V |
vim | vi |
W |
w | wall | watch | wc | wget | whatis | whereis | which | who | whoami |
X |
xargs |
Y |
yes | youtube-dl |
Z |
zcmp | zdiff | zip | zz |