Ad space (banner)
🖥️Linux Lessons
Lesson 50 / 61

Checking Memory Usage with free

free is for when "I want to check how much of the server's memory is being used." free displays the system's overall memory (RAM) usage, free space, and swap usage.

You can run free alone, but adding the -h option shows the numbers in a human-readable unit like MB or GB, instead of raw bytes.

Running free displays a table showing the total, used, free, and cached amounts, for both physical memory and swap space.

A common early mistake is looking only at the "free" number and mistaking memory the OS is productively using as cache for memory that's "running out." Looking at the available column is the accurate way to judge it.

In real work, when a server feels sluggish, this is used alongside top as an investigative command to isolate whether memory shortage is the cause.

Linux
Try it (type this into the pseudo terminal)
free

🧑‍💻 You can type this command into the Linux pseudo terminal to try it yourself (this page itself has no interactive terminal).

Ad space (banner)
Ad space (in-article)