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]

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

$ 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

🚀 Deploy ERPNext on Ubuntu VPS

This article provides a guide demonstrating how to deploy ERPNext on Ubuntu VPS. This guide…

2 days ago

Advantech AOM-2721 is now Ubuntu Certified

Canonical announces that the Advantech AOM-2721 is officially joining the list of Ubuntu Certified Hardware.…

1 week ago

Ruby and Rails Performance Roundup: The Backlog Edition

Yet again instead of tweets, a blog post. The backlog got out of hand -…

1 week ago

How to Deploy OpenProject on Ubuntu VPS

This article provides a guide demonstrating how to deploy OpenProject on Ubuntu VPS. What is…

1 week ago

Canonical integrates NVIDIA Nemotron 3.5 Lightning with Ubuntu for always-on AI agents

Canonical is pleased to announce that  NVIDIA’s newly introduced NVIDIA Nemotron 3.5 Lightning, an open,…

1 week ago

Xfwl4’s Second Preview Release

I’m pleased to announce the second preview release of xfwl4, Xfce’s Wayland compositor, version 4.21.1.…

1 week ago