free
system managementLinux/Unix
The free command is one of the most frequently used commands in Linux/Unix-like operating systems. free Display amount of free and used memory in the system
Quick Reference
Command Name:
free
Category:
system management
Platform:
Linux/Unix
Basic Usage:
free [options] [arguments]
Common Use Cases
Syntax
free [options]
Options
Option | Description |
---|---|
-b, --bytes |
Display the amount of memory in bytes |
-k, --kilo |
Display the amount of memory in kilobytes (default) |
-m, --mega |
Display the amount of memory in megabytes |
-g, --giga |
Display the amount of memory in gigabytes |
-h, --human |
Show all output fields automatically scaled to the shortest unit with three digits |
-w, --wide |
Switch to the wide mode (show buffers and cache columns) |
-c, --count=COUNT |
Display the result COUNT times, then exit |
-l, --lohi |
Show detailed low and high memory statistics |
-s, --seconds=SECONDS |
Continuously display the result with a delay of SECONDS |
-t, --total |
Display a line showing the column totals |
Examples
How to Use These Examples
The examples below show common ways to use the free
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
free