• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Linux

10 ‘free’ Commands to Check Memory Usage in Linux

How VPS by How VPS
November 2, 2018
in Linux
0
0
SHARES
124
VIEWS
Share on FacebookShare on Twitter

Contents

  1. 1. Display System Memory
  2. 2. Display Memory in Bytes
  3. 3. Display Memory in Kilo Bytes
  4. 4. Display Memory in Megabytes
  5. 5. Display Memory in Gigabytes
  6. 6. Display Total Line
  7. 7. Disable Display of Buffer Adjusted Line
  8. 8. Display Memory Status for Regular Intervals
  9. 9. Show Low and High Memory Statistics
  10. 10. Check Free Version
    1. Read Also

Linux is one of the most popular open source operating system and comes with huge set of commands. The most important and single way of determining the total available space of the physical memory and swap memory is by using “free” command.

The Linux “free” command gives information about total used and available space of physical memory and swap memory with buffers used by kernel in Linux/Unix like operating systems.

10 ‘free’ Commands to Check Memory Usage in Linux

10 Linux Free Command Examples

This article provides some useful examples of “free” commands with options, that might be useful for you to better utilize memory that you have.

1. Display System Memory

Free command used to check the used and available space of physical memory and swap memory in KB. See the command in action below.

# free

             total       used       free     shared    buffers     cached
Mem:       1021628     912548     109080          0     120368     655548
-/+ buffers/cache:     136632     884996
Swap:      4194296          0    4194296

2. Display Memory in Bytes

Free command with option -b, display the size of memory in Bytes.

# free -b

             total       used       free     shared    buffers     cached
Mem:    1046147072  934420480  111726592          0  123256832  671281152
-/+ buffers/cache:  139882496  906264576
Swap:   4294959104          0 4294959104

3. Display Memory in Kilo Bytes

Free command with option -k, display the size of memory in (KB) Kilobytes.

# free -k

             total       used       free     shared    buffers     cached
Mem:       1021628     912520     109108          0     120368     655548
-/+ buffers/cache:     136604     885024
Swap:      4194296          0    4194296

4. Display Memory in Megabytes

To see the size of the memory in (MB) Megabytes use option as -m.

# free -m

             total       used       free     shared    buffers     cached
Mem:           997        891        106          0        117        640
-/+ buffers/cache:        133        864
Swap:         4095          0       4095

5. Display Memory in Gigabytes

Using -g option with free command, would display the size of the memory in GB(Gigabytes).

# free -g
             total       used       free     shared    buffers     cached
Mem:             0          0          0          0          0          0
-/+ buffers/cache:          0          0
Swap:            3          0          3

6. Display Total Line

Free command with -t option, will list the total line at the end.

# free -t

            total       used       free     shared    buffers     cached
Mem:       1021628     912520     109108          0     120368     655548
-/+ buffers/cache:     136604     885024
Swap:      4194296          0    4194296
Total: 5215924 912520 4303404

7. Disable Display of Buffer Adjusted Line

By default the free command display “buffer adjusted” line, to disable this line use option as -o.

# free -o

            total       used       free     shared    buffers     cached
Mem:       1021628     912520     109108          0     120368     655548
Swap:      4194296          0    4194296

8. Display Memory Status for Regular Intervals

The -s option with number, used to update free command at regular intervals. For example, the below command will update free command every 5 seconds.

# free -s 5

             total       used       free     shared    buffers     cached
Mem:       1021628     912368     109260          0     120368     655548
-/+ buffers/cache:     136452     885176
Swap:      4194296          0    4194296

9. Show Low and High Memory Statistics

The -l switch displays detailed high and low memory size statistics.

# free -l

             total       used       free     shared    buffers     cached
Mem:       1021628     912368     109260          0     120368     655548
Low:        890036     789064     100972
High:       131592     123304       8288
-/+ buffers/cache:     136452     885176
Swap:      4194296          0    4194296

10. Check Free Version

The -V option, display free command version information.

# free -V

procps version 3.2.8

Read Also

Top Command, Find Command, Netstat Command.

Source: tecmint.com

Tags: Linux Commandslinux guidelinux vps setup guide
Previous Post

Disable Certain Package Updates using YUM in RHEL / CentOS / Fedora

Next Post

12 Practical Examples of Linux Xargs Command for Beginners

Next Post

12 Practical Examples of Linux Xargs Command for Beginners

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet