Skip to content

free command

Show used and free memory and swap.

On this page

Syntax

free [options]

Provided by the procps package. Run man free for the full manual.

Common options

OptionWhat it does
-hHuman-readable sizes
-mShow megabytes
-gShow gigabytes
-s NRepeat every N seconds
-tAdd a total line

Examples

  1. Memory in human-readable form

    free -h
  2. Memory in megabytes

    free -m
  3. Refresh every 2 seconds

    free -h -s 2
  4. With a total line

    free -ht

Tips

  • Look at the "available" column, not "free": Linux uses spare RAM as cache.

free guides

← All Linux commands · Suggest a fix

Back to top