Ubuntu Tools – Basic Commands
This article lists useful basic commands for quickly checking system status and performing common maintenance tasks in Ubuntu.
1) Update & Upgrade System
sudo apt update && sudo apt upgrade -y
2) Check Disk Usage
# Show usage of all mounted disks
df -h
# Show size of a specific folder
du -sh /var/www
3) Check RAM Usage
free -h
4) Check CPU and System Info
# CPU model
lscpu
# System hardware summary
uname -a
5) Check Server Model
sudo dmidecode -t system | grep -i "Product Name"
6) Clean Package Cache
sudo apt autoremove -y
sudo apt clean
7) Clear Bash History
history -c
cat /dev/null > ~/.bash_history
8) Monitor Processes
top
htop # (install with: sudo apt install htop -y)
These commands are intended as quick references for system administrators. Always run them with caution on production servers.