197 words
1 minutes
How to Check Your CPU, RAM, and Disk Space Usage on Linux

How to Check Your CPU, RAM, and Disk Space Usage on Linux#

Learn common commands to check your CPU, RAM, and disk space usage on Linux, and keep your system running smoothly.

CPU#

htop

htop shows CPU usage for each processor in real-time in an interactive display.

Output:

  0[||                          4.6%]  Tasks: 267, 882 thr, 86 kthr; 1 running
  1[||||                        7.9%]  Load average: 0.17 0.25 0.27
Mem[|||||||||||||||||||||3.29G/3.73G]  Uptime: 17:32:18
Swp[                           0K/0K]

RAM#

free -m

free -m shows memory usage in megabytes (MB). It displays several columns, but you usually want to look at the “total”, “used” and “available” columns.

Output:

               total        used        free      shared  buff/cache   available
Mem:            3819        3593         115          33         385         226
Swap:              0           0           0
  • “total” shows installed memory.
  • “used” shows memory in use by processes.
  • “available” shows free memory for new processes.

Disk Space#

df -h

df -h shows the total, used, and available disk space on your file systems.

Output:

Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           382M  3.0M  379M   1% /run
/dev/sda1        38G   25G   12G  69% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda15      241M  138K  241M   1% /boot/efi
tmpfs           382M     0  382M   0% /run/user/1000

Quick Reference#

# CPU
htop

# RAM
free -m

# Disk space
df -h
How to Check Your CPU, RAM, and Disk Space Usage on Linux
https://blog.juyoun.gg/posts/en/2025/01/12/
Author
Jay
Published at
2025-01-12
License
CC BY