How do you use free command with an example?

The free command in Linux is used to display the amount of free and used physical and swap memory in the system. It provides information about the total, used, and free memory, as well as buffers and cache used by the kernel.

Keywords: Linux, free command, memory usage, system resources, command line
Description: Learn how to use the free command in Linux to monitor your system's memory usage effectively and understand the memory statistics reported by the command.

To use the free command, simply type free in the terminal. You can also use options like -m to display the output in megabytes or -g for gigabytes.

Here’s an example of how to use the free command:

$ free -h

The output will show you a summary of memory usage, including total, used, free, shared, buff/cache, and available memory.


Keywords: Linux free command memory usage system resources command line