How much RAM memory on Ubuntu - Rocketeers

  [ Rocketeers ](/)   

[Login](https://rocketeersapp.com) 

 On this page

 Knowledge
---------

How much RAM memory on Ubuntu
=============================

### [\#Hosting](https://rocketee.rs/hosting)

This command for Ubuntu shows you the RAM memory on your server

 Published by [Mark van Eijk](https://rocketee.rs/author/mark-van-eijk) on September 2, 2024 · 1 minute read

The easiest way to see all installed, used, free and available RAM memory on your Ubuntu server is using the `free` command, we use the `-h` parameter for human readable sizes:

 ```
free -h

```

This outputs for example:

 ```
              total        used        free      shared  buff/cache   available
Mem:          7.8Gi       4.9Gi       609Mi       7.0Mi       2.3Gi       2.6Gi
Swap:         2.0Gi       253Mi       1.8Gi

```

If you only want one of these specific numbers:

 ```
# Total memory (ex. 7.8Gi)
free -h | awk '/^Mem:/ {print $2}'

# Used memory (ex. 4.9Gi)
free -h | awk '/^Mem:/ {print $3}'

# Free memory (ex. 609Mi)
free -h | awk '/^Mem:/ {print $4}'

# Shared memory (ex. 7.0Mi)
free -h | awk '/^Mem:/ {print $5}'

# Buffers/cache memory (ex. 2.3Gi)
free -h | awk '/^Mem:/ {print $6}'

# Available memory (ex. 2.6Gi)
free -h | awk '/^Mem:/ {print $7}'

```

To count CPU cores too, see [how many CPU cores your server has](/how-many-cpu-cores-on-ubuntu). When memory runs low, find [the processes using the most](/top-processes-memory) or [add swap space](/add-swap-space-on-ubuntu).

### Subscribe to our newsletter

Do you want to receive regular updates with fresh and exclusive content to learn more about web development, hosting, security and performance? Subscribe now!

  Fill in your email address to receive updates  Subscribe 

#### More in [\#Hosting](https://rocketee.rs/hosting)

- [How to get top processes with highest memory usage](https://rocketee.rs/top-processes-memory)
- [How to get top processes with highest CPU usage](https://rocketee.rs/top-processes-cpu)
- [How to add Swap Space on Ubuntu servers](https://rocketee.rs/add-swap-space-on-ubuntu)
- [Reclaim disk space on Ubuntu server](https://rocketee.rs/reclaim-diskspace-on-ubuntu)
- [Disable unnecessary and unused PHP versions (FPM pools)](https://rocketee.rs/disable-unused-php-fpm-pools)
- [How to check Ubuntu version](https://rocketee.rs/ubuntu-version)

 [View all 16 articles →](https://rocketee.rs/hosting)
