How to Check the Total RAM Installed in Ubuntu

The Memory Allocation Vector

When deploying resource-heavy applications (such as a database cluster, a Minecraft server, or a Docker swarm) on an Ubuntu Linux machine, the absolute first requirement is verifying the exact amount of physical Random Access Memory (RAM) installed. If you attempt to allocate more memory than the hardware possesses, the system will aggressively resort to swap space, causing catastrophic performance degradation and potentially crashing the entire server.

How to Check Total Installed RAM

The standard, most efficient tool for querying memory capacity in Linux is the free command.

1. Open your terminal application or connect to your server via SSH.
2. To view the raw memory statistics, execute the base command:

free

3. However, raw byte output is notoriously difficult to read. To format the output into human-readable measurements (Megabytes and Gigabytes), execute the command with the -h flag:

free -h

4. The terminal will immediately output a cleanly formatted table. Look at the top row, labelled Mem:.
5. The total column displays the absolute maximum physical RAM installed in the system.
6. The used column shows exactly how much is currently consumed by active processes.
7. The available column provides the most critical metric: the exact amount of memory remaining before the system begins swapping to the hard drive.

By executing this rapid diagnostic, administrators can safely configure application memory limits without risking a server crash.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.