A practical guide for checking and maintaining your Ubuntu system.
Includes disk health checks, file system verification, cache/RAM cleaning, and performance optimization.
Install smartmontools and check disk health:
sudo apt update && sudo apt install smartmontools -y
sudo smartctl -a /dev/sda
sudo smartctl -t long /dev/sdaRun fsck on the root partition (replace sda1 with your actual partition):
sudo fsck -f /dev/sda1Remove unnecessary packages and clean cache:
sudo apt autoremove -y
sudo apt autoclean
sudo apt cleanClean system logs older than 7 days:
sudo journalctl --vacuum-time=7dClear memory cache without removing files:
sudo sync; sudo sysctl -w vm.drop_caches=3Update the system:
sudo apt update && sudo apt upgrade -yMonitor resource usage:
htopDisable an unnecessary service:
sudo systemctl disable service_name