How to Check Memory Usage in Linux (free -m)

free displays the amount of free and used physical memory (RAM) and swap space on the system.

Published October 1, 2026

free -m shows total, used, free and available memory in megabytes. The 'available' column is the best indicator of how much memory new programs can use.

How it works

Linux uses spare RAM for disk cache, so 'free' looks small by design. Cache is reclaimed when needed.

Swap usage that keeps growing indicates real memory pressure.

Try it

free -m
total used free buff/cache available
Mem: 7977 2310 1204 4462 5320
Swap: 2047 0 2047

Practical examples

Human readable

free -h

Update every 2 seconds

free -h -s 2

Top memory processes

ps aux --sort=-%mem | head -5

Detailed info

cat /proc/meminfo | head

Common mistakes

  • Reading 'free' as available memory.
  • Ignoring swap activity.
  • Blaming cache for memory shortages.

Key takeaways

  • Look at 'available', not 'free'.
  • Cache is reclaimable.
  • Watch swap.

FAQ

Is 90% used bad?

Not if most is cache; check 'available'.

How do I clear cache?

Rarely needed: sync; echo 3 > /proc/sys/vm/drop_caches (root).

More Linux articles