A guide to troubleshooting frequent problems on Linux servers
Symptoms: Slow response times, high load average, processes using excessive CPU
top or htopps aux | grep [process_name]uptimelscpuSymptoms: "No space left on device" errors, system instability
df -hdu -sh /* | sort -rh | head -n 10apt clean for Debian-based systems)find /var/log -type f -name "*.log" -mtime +30 -deleterm -rf /tmp/*Symptoms: Unable to ping, slow or no internet access, service timeouts
ip anslookup example.comping 8.8.8.8route -niptables -L or ufw statussystemctl restart networkingSymptoms: Out of memory errors, system slowdowns, frequent swapping
free -mtop (sort by memory usage)vmstatvalgrind (for specific applications)sysctl vm.swappiness=10Symptoms: "Permission denied" errors, services unable to read/write files
ls -l [file/directory]ls -ln [file/directory]chmod [permissions] [file/directory]chown [user]:[group] [file/directory]getenforceSymptoms: Service-specific errors, application downtime
systemctl status [service_name]journalctl -u [service_name]netstat -tulpnsystemctl restart [service_name]