System Info
free
Display amount of free and used memory in the system.
Synopsis
syntax
free [OPTION]...
Examples
Show memory usage in human-readable format
free -h
Display in megabytes
free -m
Update every 5 seconds, human-readable
free -hs 5
Show total including swap
free -t
Common options
| Flag | Description |
|---|---|
| -h | Human-readable output |
| -m | Display in megabytes |
| -g | Display in gigabytes |
| -s | Repeat every N seconds |
| -t | Show total row |
About free
The `free` command display amount of free and used memory in the system. System information commands provide insight into hardware, kernel, memory, disk, and user session details.
These are typically the first tools you reach for when diagnosing system problems, capacity planning, or auditing a server's configuration. They work across most Linux distributions without additional packages.
The command accepts 5 commonly used flags shown above, though the full set of options is available in the man page (`man free`). The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.
Related commands
More System Info Commands
Other commands in the System Info category