How much RAM memory on Ubuntu - Rocketeers app

  [ Rocketeers ](/)   

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

 On this page

 Knowledge
---------

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

### [\#Hosting](https://rocketeersapp.com/knowledge/hosting)

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

 Published by [Mark van Eijk](https://rocketeersapp.com/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}'

```

### 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://rocketeersapp.com/knowledge/hosting)

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

 [View all 16 articles →](https://rocketeersapp.com/knowledge/hosting)
