Ubuntu Troubleshooting Guide: Find the Fix by Symptom
Find your symptom in the table below. If you don't know the cause yet, run these five commands; together they reveal most problems:
lsb_release -ds; uname -r
systemctl --failed
journalctl -b -p err --no-pager | tail -n 40
df -h /
sudo apt update
Can't reach a desktop or terminal? Use recovery mode or a live USB.
Find your problem
Boot and startup
| Symptom | Fix |
|---|---|
grub rescue> prompt, error: unknown filesystem | Fix grub rescue and reinstall GRUB |
| "You are in emergency mode", "Give root password for maintenance" | Fix emergency mode |
Kernel panic - not syncing: VFS: Unable to mount root fs | Fix kernel panic: unable to mount root |
| Boot takes minutes, "A start job is running for..." | Fix slow boot on Ubuntu |
Need to add nomodeset or another boot option | Set kernel boot parameters |
| Want to remove Ubuntu from a Windows dual boot | Remove Ubuntu from dual boot |
Display and graphics
| Symptom | Fix |
|---|---|
| Black screen, cursor only, or login loop after installing NVIDIA drivers | NVIDIA black screen fix |
| Need NVIDIA drivers, Secure Boot MOK screen | Install NVIDIA drivers on Ubuntu |
| App doesn't work on Wayland, no "Ubuntu on Xorg" option on 26.04 | Wayland vs X11 |
Hardware
| Symptom | Fix |
|---|---|
| "No Wi-Fi adapter found", Wi-Fi drops | Ubuntu Wi-Fi fix, then general Wi-Fi guide |
| Bluetooth toggle greyed out, no adapter, headset problems | Ubuntu Bluetooth fix |
| No sound, "Dummy Output", HDMI audio missing | No sound / Dummy Output fix |
| Touchpad dead, tap-to-click not working | Touchpad not working |
Packages and updates
| Error message | Fix |
|---|---|
E: Unable to locate package | Unable to locate package |
Could not get lock /var/lib/dpkg/lock-frontend | Could not get lock |
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' | dpkg was interrupted |
Sub-process /usr/bin/dpkg returned an error code (1) | dpkg error code 1 |
you have held broken packages, unmet dependencies | Held broken packages |
NO_PUBKEY, signatures couldn't be verified | NO_PUBKEY fix |
does not have a Release file | No Release file |
error: externally-managed-environment from pip | externally-managed-environment |
| Upgrading 24.04 to 26.04 | Upgrade Ubuntu |
System, disk and permissions
| Symptom or message | Fix |
|---|---|
No space left on device | No space left on device |
Read-only file system | Read-only file system |
Job for X.service failed because the control process exited with error code | Service failed to start |
Apps killed, Out of memory: Killed process | OOM killer |
user is not in the sudoers file | Not in the sudoers file |
Temporary failure in name resolution | DNS resolution failure |
Permission denied (publickey) over SSH | SSH publickey denied |
Ubuntu-specific pages assume the default GNOME desktop; the same fixes apply to Kubuntu, Xubuntu and Linux Mint unless a page says otherwise, because they share Ubuntu's kernel, drivers and package archive. Not listed? Browse all error messages or the distro-neutral Linux troubleshooting guide.
Step 1: Know your version and what changed
lsb_release -a
uname -r
grep -E 'install|upgrade' /var/log/dpkg.log | tail -n 20
The last command shows the most recent package changes, which is usually where a "it worked yesterday" problem started. Older logs are in /var/log/dpkg.log.1 and compressed .gz files (zgrep reads them).
Support status matters because unsupported releases get no fixes:
| Release | Standard support until | Notes |
|---|---|---|
| 26.04 LTS "Resolute Raccoon" | 2031 | GNOME 50 Wayland-only, Linux 7.0, sudo-rs, Dracut initramfs, apt-key removed |
| 24.04 LTS "Noble Numbat" | April 2029 | Can upgrade to 26.04 now; HWE kernel for new hardware |
| 22.04 LTS "Jammy Jellyfish" | April 2027 | Plan an upgrade |
| 25.10 | Ended July 2026 | Upgrade to 26.04 |
Ubuntu 26.10 is due in October 2026 as a short-term release. Release lifecycles are explained in Linux release cycles.
Step 2: Read the logs
# errors in this boot
journalctl -b -p err --no-pager
# errors in the previous boot (after a crash or a black screen)
journalctl -b -1 -p err --no-pager
# kernel and hardware messages
sudo dmesg --level=err,warn | tail -n 40
# one service
journalctl -u NetworkManager -b --no-pager | tail -n 50
Not every red line is a problem; many are harmless warnings that appear on every boot. Look for messages with the time your problem happened, and for words like failed, timeout, segfault and firmware. The journalctl cheat sheet lists filters by time, unit and priority.
If the journal from earlier boots is empty, persistent logging is off. Enable it so the next crash is recorded: sudo mkdir -p /var/log/journal && sudo systemctl restart systemd-journald.
Step 3: Check services, disk and memory
systemctl --failed
df -h
df -i /
free -h
Example output of systemctl --failed:
UNIT LOAD ACTIVE SUB DESCRIPTION
● apache2.service loaded failed failed The Apache HTTP Server
1 loaded units listed.
Investigate failed units with systemctl status UNIT; systemd basics explains the output. A root filesystem at 100% in df -h (or inodes at 100% in df -i) breaks logins, updates and many apps; it's a common hidden cause of odd behaviour. Swap fully used in free -h points to a memory problem.
Step 4: Repair packages
A failed update leaves packages half-configured, which can break the desktop, drivers or apt itself. This sequence is safe to run at any time:
sudo dpkg --configure -a
sudo apt --fix-broken install
sudo apt update
sudo apt full-upgrade
If one of these prints an error, look it up in the packages table above; the message tells you which fix applies. For understanding what apt is doing, see the apt package manager guide.
Avoid dpkg --force-all, dpkg --remove --force-depends and deleting files under /var/lib/dpkg/ unless an error page tells you exactly which file. Removing packages like ubuntu-desktop, python3 or libc6 can remove your whole desktop or make the system unbootable. Read the list of packages apt wants to remove before typing Y.
When you can't reach a desktop: recovery mode and live USB
Text console
If the screen is black or frozen but the system is running, press Ctrl+Alt+F3 for a text login. Everything in this guide works from there.
Recovery mode
Hold Shift (BIOS) or tap Esc (UEFI) right after the firmware logo to show GRUB. Choose Advanced options for Ubuntu → the newest entry ending in (recovery mode). The recovery menu offers:
- fsck: check filesystems and remount root read-write.
- dpkg: repair broken packages (needs network).
- network: enable networking.
- root: a root shell. If the filesystem is read-only, run
mount -o remount,rw /.
Also try the previous kernel in Advanced options: if it works, the problem came with a kernel or driver update. To boot with different options, such as nomodeset or systemd.unit=multi-user.target, see kernel parameters.
Live USB
Boot the Ubuntu installer USB and choose Try Ubuntu. From there you can copy your files to an external drive, check the disk (sudo fsck -f /dev/sdXN on an unmounted partition), and repair the bootloader with chroot as shown in fix grub rescue.
Roll back with a snapshot
If you set up Timeshift (or use ZFS or Btrfs snapshots), restoring the last snapshot from before the problem is often faster than debugging. Timeshift can restore from a live USB too: install it in the live session with sudo apt install timeshift, select your system disk and pick a snapshot. Snapshots don't replace backups of your personal files.
Things that commonly cause trouble
- PPAs and third-party repositories: they can replace core packages. List them with
ls /etc/apt/sources.list.d/;ppa-purgereverts a PPA's packages to Ubuntu's versions. Ubuntu's own sources live in/etc/apt/sources.list.d/ubuntu.sources(deb822 format) since 23.04. - Old tutorials using
apt-key: it is removed in Ubuntu 26.04. Add repository keys to/etc/apt/keyrings/and reference them withsigned-byinstead. - Snap vs deb confusion: Firefox, Thunderbird and others are snaps by default.
snap listandsnap changesshow snap updates, which apt doesn't see. - sudo-rs on 26.04: Ubuntu 26.04 uses the Rust rewrite of sudo by default. Day-to-day usage is the same; rare edge-case options in old sudoers files may behave differently.
- Interrupted upgrades: if a release upgrade stopped midway, run the package repair sequence above, then
sudo apt full-upgrade, before rebooting.
Asking for help effectively
When you post on Ask Ubuntu, Ubuntu Discourse or a bug tracker, include the Ubuntu version and kernel (lsb_release -ds; uname -r), the exact error text (copy, don't paraphrase), what you changed before it broke, and the relevant log lines. For hardware problems add lspci -nnk or lsusb. ubuntu-bug PACKAGE files a Launchpad bug with logs attached automatically. Ubuntu's official help pages are at help.ubuntu.com, and the distro overview is on our Ubuntu page.
Frequently asked questions
How do I boot Ubuntu into recovery mode?
Hold Shift (BIOS) or tap Esc (UEFI) during boot to show GRUB, choose Advanced options for Ubuntu, then an entry ending in (recovery mode). The menu offers a root shell, a filesystem check and a package repair option.
How do I see Ubuntu error logs?
Run journalctl -b -p err for errors in the current boot and journalctl -b -1 -p err for the previous boot. sudo dmesg shows kernel messages about hardware and drivers.
How do I fix broken packages on Ubuntu?
Run sudo dpkg --configure -a, then sudo apt --fix-broken install, then sudo apt update && sudo apt full-upgrade. The exact error message tells you which specific fix applies.
Which Ubuntu version am I running and is it still supported?
Run lsb_release -a or cat /etc/os-release. Ubuntu 26.04 LTS is supported until 2031, 24.04 LTS until April 2029 and 22.04 LTS until April 2027; 25.10 reached end of life in July 2026.
Spotted a mistake or a command that no longer works? Send a correction — pages are re-checked when reports come in.