Product SiteDocumentation Site

16.2. Viewing Memory Usage

16.2.1. Using the free Command

The free command displays the total amount of physical memory and swap space for the system, as well as the amount of memory that is used, free, shared, in kernel buffers, and cached. For example:
~]$ free
             total       used       free     shared    buffers     cached
Mem:       3084808    2293904     790904          0      88740    1557360
-/+ buffers/cache:     647804    2437004
Swap:      4194300          0    4194300
By default, free displays the values in kilobytes. To display the values in megabytes, supply the -m command line option:
~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          3012       2240        772          0         86       1520
-/+ buffers/cache:        632       2379
Swap:         4095          0       4095
For a complete list of available command line options, refer to the free(1) manual page.