Learn the Linux Command - free

Exhibit space
Yagi Studio/DigitalVision/Getty Images

Name

free - display information about free and used memory on the system

Synopsis

free [-b|-k|-m|-g] [-l] [-o] [-t] [-s delay ] [-c count ]

Description

free(1) displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache consumed by the kernel.

Options

Normal invocation of free(1) does not require any options. The output, however, can be fine-tuned by specifying one or more of the following flags:

-b, --bytes

Display output in bytes.

-k, --kb

Display output in kilobytes (KB). This is the default.

-m, --mb

Display output in megabytes (MB).

-g, --gb

Display output in gigabytes (GB).

-l, --lowhigh

Display detailed information about low vs. high memory usage.

-o, --old

Use old format. Specifically, do not display -/+ buffers/cache.

-t, --total

Display total summary for physical memory + swap space.

-c n, --count=n

Display statistics n times, then exit. Used in conjunction with the -s flag. Default is to display only once, unless -s was specified, in which case default is to repeat until interrupted.

-s n, --repeat=n

Repeat, pausing every n seconds in-between.

-V, --version

Display version information and exit.

--help

Display usage information and exit

More From Us