How to Check Memory Usage on Ubuntu
Step 1. Open a Terminal Session
If you're using an Ubuntu laptop or desktop, you can press
Ctrl + Alt + T on your keyboard to open a new terminal window. If you're using a remote Ubuntu server, you can connect using SSH to open a new terminal session.
-h option tells the command to show "human friendly" output (using familiar units like Gi for Gigabytes and Mi for Megabytes).
You should see output like:
The first line (
Mem:) shows the physical RAM available (
used, and available (
The second line (
Swap:) shows the amounts of swap memory.