General Troubleshooting Approach
Before diving into specific problems, remember these universal troubleshooting steps that apply to nearly every Linux issue:
- Read the error message — Linux error messages are usually descriptive and point directly to the problem
- Check the logs — Use
journalctl -xeor look in/var/log/for relevant log files - Search the error — Copy the exact error message and search online. Someone has almost certainly encountered it before
- Check if it is a known bug — Look at your distribution's bug tracker or forums
- Try the simple fix first — Restart the service, update your system, or reboot before attempting complex solutions
journalctl -xe
# View logs for a specific service
journalctl -u nginx --since "1 hour ago"
# View kernel messages (hardware issues)
dmesg | tail -50
# Check system log
tail -100 /var/log/syslog
Boot Problems
System Will Not Boot / GRUB Rescue
You see "grub rescue>" prompt, "error: no such partition", or a blank screen after turning on your computer.
Solution
Boot from a live USB of your distribution, then repair GRUB:
# Find your Linux partition
sudo fdisk -l
# Mount the partition (e.g., /dev/sda2)
sudo mount /dev/sda2 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
# If EFI system, also mount the EFI partition
sudo mount /dev/sda1 /mnt/boot/efi
# Chroot into your installation
sudo chroot /mnt
# Reinstall GRUB
grub-install /dev/sda
update-grub
# Exit and reboot
exit
sudo reboot
Black Screen After Login
You can enter your password at the login screen, but the desktop never loads or you see a black screen with a cursor.
Solution
This is usually a graphics driver issue. Switch to a virtual terminal and reconfigure:
# Log in with your username and password
# Reinstall display manager
sudo apt install --reinstall gdm3
# Or try resetting display settings
rm -rf ~/.local/share/gnome-shell
# For Nvidia driver issues
sudo ubuntu-drivers autoinstall
# Restart the display manager
sudo systemctl restart gdm3
Network Problems
Wi-Fi Not Working
Wi-Fi adapter is not detected, cannot connect to networks, or connection drops frequently.
Solution
lspci | grep -i network
lsusb | grep -i wireless
# Check if the driver is loaded
lsmod | grep -i wifi
lsmod | grep -i iwl
# Check if the interface exists
ip link show
# Make sure Wi-Fi is not blocked
rfkill list all
sudo rfkill unblock wifi
# Restart NetworkManager
sudo systemctl restart NetworkManager
# If driver is missing, install it
sudo apt install linux-firmware
sudo apt install broadcom-sta-dkms # For Broadcom chips
DNS Resolution Failing
You can ping IP addresses but not domain names. "Temporary failure in name resolution" errors.
Solution
ping 1.1.1.1 # Works? Internet is fine
ping google.com # Fails? DNS is the issue
# Check current DNS configuration
resolvectl status
# Quick fix: set DNS manually
sudo nano /etc/resolv.conf
# Add: nameserver 1.1.1.1
# Add: nameserver 8.8.8.8
# Restart resolved
sudo systemctl restart systemd-resolved
Package Management Problems
Broken Packages / Dependency Errors
"Unmet dependencies", "broken packages", or apt refuses to install anything.
Solution
sudo apt --fix-broken install
# Reconfigure pending packages
sudo dpkg --configure -a
# Clean package cache and retry
sudo apt clean
sudo apt update
sudo apt upgrade
# Nuclear option: force remove a problematic package
sudo dpkg --remove --force-remove-reinstreq package-name
sudo apt --fix-broken install
"Could Not Get Lock" Error
"Could not get lock /var/lib/dpkg/lock-frontend" when trying to install packages.
Solution
This means another package manager process is running. Wait for it to finish, or if no other process is running:
ps aux | grep -i apt
# If no other process is running, remove the lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/apt/lists/lock
sudo dpkg --configure -a
Disk and Storage Problems
Disk Space Full
System becomes slow or unresponsive. "No space left on device" errors.
Solution
df -h
# Find the largest directories
sudo du -sh /* 2>/dev/null | sort -rh | head -10
# Clean package cache
sudo apt clean
sudo apt autoremove --purge
# Remove old kernels (keep current)
sudo apt autoremove --purge
# Clean journal logs older than 7 days
sudo journalctl --vacuum-time=7d
# Find large files
sudo find / -type f -size +100M -exec ls -lh {} \; 2>/dev/null
# Interactive disk usage analyser
sudo ncdu /
Permission Problems
"Permission Denied" Errors
Cannot access files, run scripts, or modify configuration. "Permission denied" messages.
Solution
ls -la filename
# Make a script executable
chmod +x script.sh
# Fix ownership (if files belong to wrong user)
sudo chown -R $USER:$USER ~/my-project/
# Fix common web server permissions
sudo chown -R www-data:www-data /var/www/html
sudo chmod -R 755 /var/www/html
# Check if user is in required group
groups $USER
sudo usermod -aG docker $USER # Example: add to docker group
newgrp groupname to activate the group in the current session.Audio Problems
No Sound Output
No audio from speakers or headphones. Sound settings show output device but no sound plays.
Solution
aplay -l
# Check PulseAudio / PipeWire status
pactl info
pactl list sinks short
# Make sure volume is not muted
amixer set Master unmute
amixer set Master 75%
# Restart the audio service
systemctl --user restart pipewire pipewire-pulse
# For PulseAudio systems
pulseaudio --kill
pulseaudio --start
When All Else Fails
- Check your distribution's forums and wiki — Ubuntu Forums, Arch Wiki, Fedora Discussion are goldmines of information
- Search with the exact error message — Include your distribution name and version in the search
- Boot a live USB — If the system is unbootable, a live USB lets you access and repair your files
- Reinstall as a last resort — If you have backups, a fresh install takes only 20 minutes and gives you a clean slate
Learn more about LinuxLand.
About Us →