System

free

Show memory and swap usage.

memoryramswapsystemmonitor

Additional Notes

free shows system memory and swap usage. It helps you understand RAM pressure, cache usage, and available memory.

Linux uses free memory for buffers and cache, so low free memory is not always a problem. The available column is usually more useful.

Syntax

free [options]

Parameters

  • options: Flags that change how free behaves.

Common Options

  • -h, --human: Human-readable units.
  • -m: Show MiB.
  • -g: Show GiB.
  • -s SECONDS: Repeat output every interval.
  • -t: Show total line.
  • -w: Wide output.

Examples

free

Show memory usage.

free -h

Show readable memory usage.

free -h -t

Show memory, swap, and totals.

free -h -s 2

Refresh every two seconds.

Reading Output

  • total: Total memory.
  • used: Memory currently used.
  • free: Completely unused memory.
  • buff/cache: Memory used for buffers and cache.
  • available: Estimate of memory available for new applications.
  • Swap: Disk-backed memory area.

Practical Notes

  • Watch available, not only free.
  • Heavy swap usage may indicate memory pressure.
  • Use top, htop, or ps aux --sort=-%mem to find memory-heavy processes.
  • Cache memory is normally reclaimed when applications need it.