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

free --help

Display the RAM uses information in kibibyte (kiB)

free command without any argument displays the summary of RAM usage in kiB.

free

free command in linux

Understand the output of free command

Mem:

Swap:

total:

used:

free:

shared:

buff/cache:

available:

Display RAM usage in human readable format

free -h

free -h command in linux

 

Display Memory usage in Megabytes

free -m

free -m command in linux

Display Memory usage in Bytes

free -b

free -b command in linux

Display Memory usage in Kilobytes

free -k

free -k command in linux

Display Memory usage in Gigabytes

free -g

free -g command in linux

Display the total of RAM + Swap

free -t

Display memory usage at fixed interval of time

Use CTRL+C for exit

free -s 3

free -s 3 command in linux

Display memory usage at fixed interval of time

free -s 3 -c 4

free -s 3 -c 4 command in linux

 

Sharing is Caring
Scroll to Top