LinuxCommandLibrary

free

TLDR

Display system memory

$ free
copy
Display memory in human-readable units
$ free -h
copy
Display memory in bytes/KB/MB/GB
$ free -b
copy
$ free -k
copy
$ free -m
copy
$ free -g
copy
Refresh the output every 2 seconds
$ free -s 2
copy
Display totals line
$ free -t
copy

SYNOPSIS

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

DESCRIPTION

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered from /proc/meminfo.

PARAMETERS

-b

Display in bytes
-k
Display in kilobytes (default)
-m
Display in megabytes
-g
Display in gigabytes
-h, --human
Display in human-readable format with units
-s, --seconds delay
Continuously display output every delay seconds
-c, --count count
Display output count times (use with -s)
-t, --total
Display a line showing totals
-w, --wide
Wide output (separate buffers and cache)
-l, --lohi
Show detailed low and high memory statistics

CAVEATS

The "available" memory column (added in Linux 3.14) is a better estimate of how much memory is available for starting new applications. "Free" memory doesn't account for buffers/cache that can be released.

HISTORY

Part of the procps (or procps-ng) package, which provides process monitoring utilities for Linux.

SEE ALSO

top(1), htop(1), vmstat(8), proc(5)

Copied to clipboard