Knowing how your server uses CPU, memory, disk, and network resources is essential for capacity planning and troubleshooting. Ubuntu 26.04 LTS comes with several built-in tools and supports popular third-party monitors. This guide covers the most useful commands and tools for resource monitoring.
Tested and valid on:
- Ubuntu 26.04 LTS
Prerequisites
- Ubuntu 26.04 LTS server
- A user with sudo privileges
Step 1 – Quick Overview with top
The built-in top command shows real-time CPU and memory usage:
top
Press q to exit. Sort by CPU with P or by memory with M.
Step 2 – Install and Use htop
htop is an improved interactive process viewer:
sudo apt install htop -y
htop
Use arrow keys to navigate, F9 to kill a process, and q to quit.
Step 3 – Check Memory Usage
Get a quick memory and swap summary:
free -h
Detailed virtual memory statistics:
vmstat 1 5
Step 4 – Check Disk Usage
Show disk space used by all mounted file systems:
df -h
Find which directories use the most space:
du -sh /var/* 2>/dev/null | sort -rh | head -10
Step 5 – Check Disk I/O with iostat
Install the sysstat package for iostat:
sudo apt install sysstat -y
iostat -xz 1 5
Step 6 – Check Network Traffic
Install and use nload for real-time bandwidth monitoring:
sudo apt install nload -y
nload
Or use ss to list active connections:
ss -tuln
Step 7 – Install Glances (all-in-one dashboard)
glances provides a comprehensive dashboard in one screen:
sudo apt install glances -y
glances
Step 8 – System Load and Uptime
Check system uptime and load average:
uptime
View detailed system information:
uname -a
lscpu | grep -E 'CPU|Thread|Core|Socket'
Conclusion
You now have a toolkit of monitoring commands and tools for Ubuntu 26.04 LTS. For persistent monitoring with alerting and historical graphs, consider deploying Prometheus with Grafana or installing Netdata — both covered in later tutorials in this series.