Free Command in Linux

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. 

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux system commands queries.

In this context, we shall look into how to use the free command through several examples.


What is the syntax of free command ?

Its syntax is given below:

$ free [options]

From the output, you will see some of the following features:

  • 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
  • Its options is explained below:
  • -b output with unit bytes: $ free -b
  • -k output with unit kilobytes: $ free -k
  • -m output with unit megabytes: $ free -m
  • -g output with unit gigabytes: $ free -g
  • -t more statistics on total memory capacity including swap space: $ free -t
  • -s statistics with delay time appearing. For example, I want to make statistics every 3 seconds: $ free -s3


[Need to fix any system files issues in Linux ? We can help you. ]

This article covers how to use the free command with some examples. In fact, the free command provides information about unused and used memory and swap space on any computer running Linux or another Unix-like operating system.

For more information about free command type in your terminal:

$ man free

Related Posts