BM Balmiki Mandal 04 May 2023 0 views 0 comments Linux

Master Free Command in Linux with Examples

Everything You Need to Know About the Free Command in Linux

The "free" command in Linux is a helpful tool for monitoring system memory consumption. It can provide critical information about how much RAM is being used, how much is available, and what processes are consuming the most amount of RAM.

How Does the Free Command Work?

The free command summarizes information about the system's RAM and swap space usage. This information is usually presented in kilobytes. The output of the command shows the total amount of memory available in the system, the amount of memory being used, the amount of memory that is still free and available to be used as well as the percentage of memory being used.

Syntax of the Free Command

The syntax of the command is relatively simple and consists of just four main parameters. These parameters are: --total, -o, -m, and --human.

  • --total: This will return the total amount of RAM and swap space on the system.
  • -o: This will return the amount of memory being used.
  • -m: This will return the amount of memory available.
  • --human: This will return the amount of memory being used in a human-readable format.

Examples of the Free Command

Let's take a look at a few examples of the free command. The following command will return the total amount of system memory in kilobytes:

$ free --total

The following command will return the percentage of system memory being used:

$ free -m --total

Finally, the following command will return the amount of system memory being used in a human-readable format:

$ free --humann --total

Conclusion

The free command is a useful tool for monitoring your system memory usage. By using the free command, you can quickly get an overview of the amount of RAM being used, the amount of RAM that is still available, and the percentage of RAM being used. Hopefully this article has given you a better understanding of the free command and how it can be used in Linux.

Share:

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

How to Create an Embedded Linux Development Environment on Windows Using WSL2

 Creating an Embedded Linux Development Environment on Windows Using WSL2If you are learning Embedded Linux, y...

AG Anvesh G 05 Sep 2026
Installing Ubuntu OS in Window Using VirtualBox

Installing Ubuntu on Windows Using VirtualBoxSteps:-1. Download and Install VirtualBox Download VirtualBox fr...

BM Balmiki Mandal 18 Jan 2025
Kali Linux 2021.4, Apple M1 support, armhf, arm64, Electro4u

Kali Linux 2021.4 Brings Improved Apple M1 Support Kali Linux, the world’s premier open-source penetration te...

BM Balmiki Mandal 06 Jun 2023