Quick take: The free command shows memory usage. Run free -h for human-readable output. The number that matters is available — the memory apps can use — not free, because Linux deliberately uses spare RAM for cache.
Introduction
The free command reports how much memory the system is using and how much is available. It is the quickest way to check for memory pressure, but its output is widely misread: Linux uses otherwise-idle RAM for caching, so a low “free” figure is normal and healthy.
This guide covers reading the output correctly, the crucial difference between free and available memory, and watching memory over time.
Syntax
The basic syntax of the free command is:
free [OPTIONS]free vs available: Reading the Output
The most common mistake is panicking at a low “free” value. Linux fills unused RAM with disk cache to speed things up, and releases it instantly when applications need memory. So the column that reflects real headroom is available, not free.
- used — memory actively used by processes.
- free — completely unused memory (usually low, and that is fine).
- buff/cache — memory used for disk caching, reclaimable on demand.
- available — an estimate of how much memory new applications can use, including reclaimable cache. This is the number to watch.
If available is healthy, the system has memory to spare even when free looks small.
Common Options and Parameters
The most useful options and parameters for the free command:
| Option | Description |
|---|---|
| -h | Human-readable sizes (MiB, GiB). |
| -m / -g | Show values in mebibytes / gibibytes. |
| -s N | Refresh continuously every N seconds. |
| -t | Show a total line (RAM plus swap). |
| -w | Wide mode — separate buffers and cache columns. |
Practical Examples
Real free commands you can run today:
# Human-readable memory summary
free -h
# Show totals for RAM and swap
free -h -t
# Refresh every 2 seconds
free -h -s 2
# Values in megabytes
free -m
# Wide view separating buffers and cache
free -w -hTips and Best Practices
- Judge memory health by the available column, not free — Linux uses spare RAM for cache by design.
- Watch the swap line: heavy swap usage with low available memory is a real sign of memory pressure.
- Use
free -s 2to watch memory live, ortop/htopfor a per-process breakdown.
Final Thoughts
free is the fastest memory check in Linux, but only if you read it correctly. Ignore the alarmingly low “free” figure and focus on available, which accounts for reclaimable cache. Combine it with the swap line to spot genuine memory pressure, and drop into top or htop when you need to see which process is responsible.
FAQ: free Command in Linux
How do I check memory usage in Linux?+
Run free -h for a human-readable summary of total, used, free, and available memory plus swap. For a live per-process view, use top or htop.
What is the difference between free and available memory?+
free is memory that is completely unused, which is normally low because Linux caches data in spare RAM. available estimates how much memory applications can actually use, including reclaimable cache — it is the number that reflects real headroom.
Why is my free memory so low?+
Linux deliberately uses idle RAM for disk cache (buff/cache) to improve performance, and frees it the moment programs need it. Low free with healthy available is normal and good, not a problem.
How do I monitor memory continuously?+
Use free -s 2 to refresh every two seconds, or watch -n 2 free -h. For interactive monitoring with per-process detail, run top or htop.
When should I worry about memory?+
Worry when the available column is very low and swap usage is high and growing — that indicates genuine memory pressure. A low free value on its own is not a concern.
Need help with Linux servers or infrastructure?
Work directly with Muhammad Irfan Aslam for Linux, Ubuntu, Docker, DevOps, cloud, CI/CD, or infrastructure support.
Hire Me for Support