FREE(1)
๐ FREE(1) โ the "how much RAM do I even have left" page ๐
okay bestie, pull up a chair, because this is genuinely one of the most useful little commands on your whole system and I need you to be obsessed with it. it's free, it lives in the General Commands Manual section, and it's giving "tell me everything about my memory right now" energy. ๐งโจ
โจ NAME โจ
free โ display amount of free and used memory in the system ๐ซถ
๐ธ SYNOPSIS ๐ธ
free [option ...]
๐ DESCRIPTION ๐
so like, free shows you the total amount of free and used physical and swap memory in your system, plus the buffers and caches the kernel is holding onto. where does it get this tea from? it gathers everything by parsing /proc/meminfo. iconic behavior honestly.
here are the columns it serves you, one by one ๐
totalโ total usable memory (MemTotalandSwapTotalin/proc/meminfo). this is physical and swap memory minus a few reserved bits and kernel binary code. the math is mathing, don't worry about it.usedโ used or unavailable memory, calculated astotal - available. that's it, that's the formula, no cap.freeโ unused memory (MemFreeandSwapFreein/proc/meminfo). the sad little number we all stare at ๐ญsharedโ memory used (mostly) by tmpfs (Shmemin/proc/meminfo).buffersโ memory used by kernel buffers (Buffersin/proc/meminfo).cacheโ memory used by the page cache and slabs (CachedandSReclaimablein/proc/meminfo).buff/cacheโ literally just the sum ofbuffersandcache. bestie behavior: they hold hands. ๐ซถavailableโ an estimation of how much memory is available for starting new applications, without swapping. and listen, this one is different fromcacheorfreeon purpose: it takes into account page cache, and also the fact that not all reclaimable memory slabs will actually get reclaimed, because some items are still in use. this isMemAvailablein/proc/meminfoโ available on kernels 3.14, emulated on kernels 2.6.27+, and otherwise it's just the same asfree.
๐ OPTIONS ๐
-b,--bytesโ display the amount of memory in bytes.-k,--kibiโ display the amount of memory in kibibytes. this is the default, so if you do nothing, this is what you get. ๐ซ-m,--mebiโ display the amount of memory in mebibytes.-g,--gibiโ display the amount of memory in gibibytes.--tebiโ display the amount of memory in tebibytes.--pebiโ display the amount of memory in pebibytes.--kiloโ display the amount of memory in kilobytes. implies--si.--megaโ display the amount of memory in megabytes. implies--si.--gigaโ display the amount of memory in gigabytes. implies--si.--teraโ display the amount of memory in terabytes. implies--si.--petaโ display the amount of memory in petabytes. implies--si.-h,--humanโ show all output fields automatically scaled to the shortest three digit unit, and display the units of the print out. these are the units it uses, bestie:
B = bytes
Ki = kibibyte
Mi = mebibyte
Gi = gibibyte
Ti = tebibyte
Pi = pebibyte
and here's the lil caveat: if the unit is missing, and you have exbibyte of RAM or swap, the number is in tebibytes and the columns might not be aligned with the header. ๐ฌ it's giving "we tried our best."
-w,--wideโ switch to the wide mode. wide mode produces lines longer than 80 characters. in this mode,buffersandcacheare reported in two separate columns. so much room, so much info. ๐-c,--countcount โ display the result count times. requires the-soption, so don't forget your bestie-s. ๐ซถ-l,--lohiโ show detailed low and high memory statistics.-L,--lineโ show output on a single line, often used with the-soption to show memory statistics repeatedly. it's giving "one line, endless tea."-s,--secondsdelay โ continuously display the result delay seconds apart. you may actually specify any floating point number for delay, using either.or,for the decimal point (yes really, both).usleep(3)is used for microsecond resolution delay times. precision queen โจ--siโ use kilo, mega, giga etc (power of 1000) instead of kibi, mebi, gibi (power of 1024). pick your lore.-t,--totalโ display a line showing the column totals.-v,--committedโ display a line showing the memory commit limit and the amount of committed/uncommitted memory. thetotalcolumn on this line will display the memory commit limit. this line is relevant if memory overcommit is disabled. on systems with memory overcommit enabled, thefreevalue can temporarily appear negative.
NOT A BUG, bestie, i promise!! it's an effect of overcommit โ the system has promised more memory than the total of its virtual address space. the negative value indicates the magnitude of the system's memory over-allocation. ๐ so if you see a negative number, that's the system being extra, not free lying to you.
--helpโ print help.-V,--versionโ display version information.
๐ FILES ๐
/proc/meminfoโ memory information. the source of all the tea. โ
๐ BUGS ๐
the value for the shared column is not available from kernels before 2.6.32, and is displayed as zero. so if you're on some ancient kernel and wondering why shared is giving nothing, that's why ๐
please send bug reports to procps@freelists.org. they're lovely, be nice. ๐
๐ SEE ALSO ๐
ps(1), slabtop(1), top(1), vmstat(8).
and that's the whole page, bestie!! this absolute icon of a manpage came to you from procps-ng, dated 2023-05-02, and it's genuinely one of the most "iykyk" commands in your toolbox. go check your RAM, it's free real estate (or it's not, and now you'll know exactly why). ๐ โจ๐ฆ
๐ฆ where this page comes from
- alpine 3.24: procps-ng-doc 4.0.6-r0 ยท GPL-2.0-or-later AND LGPL-2.1-or-later
- arch rolling: procps-ng 4.0.7-1 ยท GPL AND LGPL
- fedora 44: procps-ng 4.0.6-1.fc44 ยท GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- fedora 44: procps-ng 4.0.6-1.fc44 ยท GPL-2.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-or-later
- nixos 26.05: procps 4.0.6
- nixpkgs unstable: procps 4.0.7
- ubuntu stonking: procps 2:4.0.6-3ubuntu1 ยท LGPL-2.1-or-later
- Copyright (c) 2011-2023 Craig Small <csmall@dropbear.xyz>
- Copyright (c) 2013-2023 Jim Warner <james.warner@comcast.net>
- Copyright (c) 2011-2012 Sami Kerola <kerolasa@iki.fi>
- Copyright (c) 2002-2003 Albert Cahalan
- Copyright (c) 1993 Matt Welsh <mdw@sunsite.unc.edu>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms