Categories: TutorialsUbuntu

Free Command in Linux

Introduction

free command is used to check the total amount of free space available with used memory and swap memory in your system.

This command is very necessary for Linux administrators when you want to install a large program. It saves time to check the capacity thereby making the installation process more smooth. We will show you how to use the free command through several examples as you go through below.

The syntax of free command

$ free [options]

Sponsored

total: total installed memory

used: total used memory

free: free available memory

shared: memory used by tmpfs

buff: memory used by the OS kernel

cache: memory used to store temporary data

available: total available memory

options:

-b output with unit bytes

$ free -b

Output:

-k output with unit kilobytes

$ free -k

Output:

-m output with unit megabytes

Sponsored
$ free -m

Output:

-g output with unit gigabytes

$ free -g

Output:

-t more statistics on total memory capacity including swap space

$ free -t

Output:

-s statistics with delay time appearing

For example, I want to make statistics every 3 seconds:

$ free -s3

Output:

Conclusion

In this tutorial, we guided you on how to use the free command with some examples.

Thanks for reading!

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

2 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

5 days ago