• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

free: command not found

by admin

The free command parses the /proc/meminfo file for easier analysis of memory usage statistics. Its default behavior is to display the following information about system memory and swap space:

  • The total memory.
  • The total used.
  • The total free.
  • The total shared.
  • The total buffered and cached.
  • The total available for starting new apps (estimated).

Syntax

The syntax of the free command is:

# free [options]

If you encounter the below error while running the free command:

free: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install procps
Ubuntu apt-get install procps
Alpine apk add procps
Arch Linux pacman -S procps-ng
Kali Linux apt-get install procps
CentOS yum install procps-ng
Fedora dnf install procps-ng
Raspbian apt-get install procps

free Options

There are several command options available for the free command.

Options Used To
-b, -k, -m, -g, -tera Display memory in bytes, kilobytes, megabytes, gigabytes, and terabytes, respectively.
-s {seconds} Update memory statistics at a delay of the specified seconds.
-o Disable the display of the buffered/cached information.
-t Display a total line that combines physical RAM with swap space.
-h Make the output more human-readable.

Buffer/Cache Output

Memory can be cached, meaning that it is stored temporarily so that the data it contains can be accessed much quicker in the future. The Buffers field in /proc/meminfo indicates memory that is assigned to a specific block device. This memory is used to cache file system metadata, like directory contents, permissions, etc. The Cached memory is similar, but instead of storing file metadata, it stores the actual contents of files. The free command combines these two values together upon output.

free Command Examples

1. To display the memory utilization:

# free

2. To display the memory utilization in bytes:

# free -b 

3. To display the memory utilization in kilo bytes:

# free -k 

4. To display the memory utilization in mega bytes:

# free -m 

5. To display the memory utilization in giga bytes:

# free -g 

6. To display the memory utilization with totals:

# free -t 

7. To display the memory utilization skipping displaying “buffer adjusted”:

# free -o 

8. To display the continuous polling data:

# free -s 2 10 

9. To see the detailed high and low statistics for memory usage:

# free -l 

10. To get the version information:

# free -V 

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to use ipset Command in Linux
  2. Beginners Guide to Automounting File Systems in CentOS / RHEL
  3. Slow SSH login due to unreachable rsyslog server
  4. How to configure Linux Resource Groups (cgroups) for MySQL
  5. How to interpret Linux martian source messages
  6. CentOS / RHEL 7 : Understanding Kexec and Kdump
  7. alias Command Examples in Linux
  8. nping: command not found
  9. btrfs rescue Command Examples in Linux
  10. LVM VG Metadata Corruption with ‘Checksum error’

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright