Free command in linux

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]

Free command in linux 1

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:

Free command in linux 2

-k output with unit kilobytes

$ free -k

Output: Free command in linux 3

-m output with unit megabytes

Sponsored
$ free -m

Output:

Free command in linux 4

-g output with unit gigabytes

$ free -g

Output:

Free command in linux 5

-t more statistics on total memory capacity including swap space

$ free -t

Output:

Free command in linux 6

-s statistics with delay time appearing

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

$ free -s3

Output:

Free command in linux 7

Conclusion

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

Thanks for reading!

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply