cat /proc/meminfo | grep -E 'MemTotal|MemAvailable|SwapTotal'

Category: Self-Hosting

cat /proc/meminfo | grep -E 'MemTotal|MemAvailable|SwapTotal'

Check total RAM, available RAM, and swap size from the kernel's memory stats

Reads memory stats directly from the kernel. MemAvailable is more useful than MemFree — it includes memory that can be freed from caches on demand.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.