Advertisement
linuxserver Linux is powerful, but sometimes things go wrong. This tutorial will guide you through common system issues, how to diagnose them, and practical steps to fix them. We’ll cover errors related to disk space, memory, processes, network, and package management, with clear explanations for beginners.

Beginner’s Guide to Troubleshooting Linux and System Issues

5 Min Read Verified Content

1. Check Disk Space Issues

Problem: System is slow or refuses to write files.

Diagnosis:

df -h du -sh ~/*

Explanation:

  • df -h → shows disk usage for all mounted partitions

  • du -sh ~/* → shows size of each folder in your home directory

Solution:

  • Delete unnecessary files: rm -rf ~/Downloads/old_files/*

  • Clean package cache:

sudo apt-get clean # For Ubuntu/Debian sudo yum clean all # For CentOS/RHEL


2. Check Memory and Swap Issues

Problem: System freezes or programs crash.

Diagnosis:

free -h top

Explanation:

  • free -h → shows RAM and swap usage

  • top → shows top processes consuming memory

Solution:

  • Kill memory-hogging processes:

kill -9 <PID>
  • Add swap space if necessary:

sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile


3. Check CPU Usage Issues

Problem: System is extremely slow, fan running at full speed.

Diagnosis:

top htop # if installed

Explanation:

  • top → shows processes using CPU

  • Look for high %CPU usage

Solution:

  • Kill or restart processes using excessive CPU

  • Investigate running services that may need optimization



4. Troubleshoot Network Issues

Problem: Cannot access the internet or server connection fails.

Diagnosis:

ping google.com ifconfig # or ip addr traceroute google.com

Explanation:

  • ping → checks network connectivity

  • ifconfig / ip addr → shows network interfaces and IP addresses

  • traceroute → shows path packets take to reach destination

Solution:

  • Restart network service:

sudo systemctl restart NetworkManager
  • Check firewall rules:

sudo ufw status sudo iptables -L


5. Troubleshoot Package Installation Errors

Problem: Cannot install or update software.

Diagnosis:

sudo apt update # Ubuntu/Debian sudo yum check-update # CentOS/RHEL

Explanation:

  • Updates repository information and checks for package errors

Solution:

  • Fix broken packages:

sudo apt --fix-broken install sudo dpkg --configure -a
  • Clear package cache and try again:

sudo apt-get clean sudo apt-get update


6. Check System Logs

Problem: Unknown errors or crashes.

Diagnosis:

dmesg | tail -n 50 journalctl -xe cat /var/log/syslog | tail -n 50

Explanation:

  • dmesg → kernel messages

  • journalctl → systemd logs

  • /var/log/syslog → general system logs

Solution:

  • Identify repeating errors

  • Google error messages for guidance

  • Adjust system configuration or services based on log info



7. General Troubleshooting Tips

  1. Reboot – sometimes it solves transient issues.

  2. Backup logs – always keep logs before making changes.

  3. Search online – copy exact error messages; Linux forums are very helpful.

  4. Test changes in a controlled environment before applying to production.



Summary

This tutorial provides a structured approach to troubleshooting:

  1. Check disk space

  2. Check memory and CPU

  3. Check network

  4. Check packages

  5. Examine system logs

By following these steps, beginners can systematically diagnose and fix common Linux issues without panic.

Advertisement
Back to Linuxserver