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!

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.

Ubuntu Server Admin

Recent Posts

Install FreePBX and Asterisk on Ubuntu 24.04 LTS for security patches until 2036

Deploying FreePBX and Asterisk on a single Ubuntu virtual machine in a public cloud is…

13 hours ago

Certification as a strategy: How Ubuntu & SystemReady boost hardware competitiveness

Canonical and MediaTek enhance reliability, accelerate market entry and reduce Total Cost of Ownership (TCO)…

13 hours ago

Ubuntu 20.04 LTS on Azure: how to stay secure after standard support ends

As Ubuntu 20.04 LTS (Focal Fossa) standard support ends on May 31, 2025, Azure users…

13 hours ago

Ubuntu Weekly Newsletter Issue 881

Welcome to the Ubuntu Weekly Newsletter, Issue 881 for the week of February 23 –…

1 day ago

Experiment Tracking with MLFlow in Canonical’s Data Science Stack

Welcome back, data scientists! In my previous post, we explored how easy it is to…

2 days ago

How to Install vLLM on Linux Using 4 Easy Steps

In this article, we will see how to install vLLM on Linux using 4 easy…

2 days ago