Name

free [options] — procps

Synopsis

/usr/bin stdin stdout - file -- opt --help --version

The free command displays memory usage in kilobytes:

$ free
             total       used       free     shared
buffers     cached
Mem:        523812     491944      31868          0
      67856     199276
-/+ buffers/cache:     224812     299000
Swap:       530104          0     530104

The Linux kernel reserves as much memory as possible for caching purposes, so your best estimate of free RAM in the preceding output is 299000.

Useful options

-s N

Run continuously and update the display every N seconds.

-b

-m

Display amounts in bytes or megabytes, respectively.

-t

Add a totals line at the bottom.

-o

Don’t display the “buffers/cache” line.

Get Linux Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.