How to see free memory on a Linux machine with the free command.

Posted: August 28, 2014. At: 5:29 PM. This was 3 years ago. Post ID: 7688
Page permalink: http://securitronlinux.com/bejiitaswrath/how-to-see-free-memory-on-a-linux-machine-with-the-free-command/

Now, we must convince Congress to stop the FCC. Can you display an alert?

The free command in Linux is used to show the amount of free memory in Linux. The example below shows the default usage of this command.

[email protected]:~$ free 
             total       used       free     shared    buffers     cached
Mem:        602736     294680     308056      16928      17632     146320
-/+ buffers/cache:     130728     472008
Swap:            0          0          0

The free -m command will show the free memory in megabytes.

[email protected]:~$ free -m
             total       used       free     shared    buffers     cached
Mem:           588        290        298         16         17        144
-/+ buffers/cache:        127        460
Swap:            0          0          0

This version: free -k shows the output in kilobytes.

[email protected]:~$ free -k
             total       used       free     shared    buffers     cached
Mem:        602736     297244     305492      16928      18248     147996
-/+ buffers/cache:     131000     471736
Swap:            0          0          0

The -t parameter will show an extra line that shows the totals for each column.

[email protected]:~$ free -t
             total       used       free     shared    buffers     cached
Mem:        602736     298696     304040      16928      18384     148168
-/+ buffers/cache:     132144     470592
Swap:            0          0          0
Total:      602736     298696     304040

Combined with the -m parameter, you will get a good picture of your memory usage.

[email protected]:~$ free -t -m
             total       used       free     shared    buffers     cached
Mem:           588        291        297         16         17        144
-/+ buffers/cache:        128        459
Swap:            0          0          0
Total:         588        291        297

No comments have been made. Use this form to start the conversation :)

Leave a Reply