Linux Error Guides
A growing library of 61 production Linux error guides — each one gets you from error message to root cause, fix, validation, and prevention with real commands. Written for DevOps, SRE, and Linux engineers debugging live incidents, not reading theory.
Networking & DNS
13 guidesbind: Address already in use
How to fix bind: Address already in use (EADDRINUSE) on Linux. Find the listener with ss and lsof, clear TIME_WAIT, and untangle systemd socket conflicts.
Cannot assign requested address
How to fix the Linux 'Cannot assign requested address' (EADDRNOTAVAIL) error: bind to a missing IP, ephemeral port exhaustion, wrong interface, and IPv6 binds.
Connection refused
How to fix the Linux 'Connection refused' error (ECONNREFUSED): diagnose closed ports, dead services, wrong bind address and firewalls with ss, curl and nc.
Connection timed out
How to fix the Linux 'Connection timed out' error (ETIMEDOUT): diagnose dropped packets, firewalls, security groups and routing with ss, curl, nc and ip route.
curl: (6) Could not resolve host
How to fix the 'curl: (6) Could not resolve host' error on Linux: diagnose broken DNS, resolv.conf, proxies and systemd-resolved on Ubuntu and RHEL.
Destination Host Unreachable
How to fix the Linux 'Destination Host Unreachable' ping error: diagnose ARP failures, wrong gateways, subnet mask mistakes, and firewall drops on the same LAN.
Name or service not known
How to fix the Linux 'Name or service not known' error (EAI_NONAME): diagnose failed DNS lookups, /etc/hosts, resolv.conf and systemd-resolved on Ubuntu and RHEL.
Network is unreachable
How to fix the Linux 'Network is unreachable' (ENETUNREACH) error: diagnose missing routes, default gateways, down interfaces, and IPv6 vs IPv4 routing problems.
nf_conntrack: table full, dropping packet
Fix 'nf_conntrack: table full, dropping packet' on Linux: understand nf_conntrack_max vs conntrack count, hashsize, timeouts, and NAT-driven exhaustion.
NIC Link is Down
Fix 'NIC Link is Down', 'Reset adapter' and Tx Unit Hang errors in dmesg. Diagnose carrier loss, autoneg mismatches and ring buffers with ethtool.
No route to host
How to fix the Linux 'No route to host' error (EHOSTUNREACH): diagnose missing routes, firewall REJECTs, ARP failures and down interfaces with ip route and ss.
sudo: unable to resolve host <hostname>
How to fix the Linux sudo: unable to resolve host error: the machine's hostname is missing from /etc/hosts. Diagnose with hostname, hostnamectl, and fix on Ubuntu/RHEL.
Temporary failure in name resolution
How to fix the Linux 'Temporary failure in name resolution' error (EAI_AGAIN): diagnose broken DNS, resolv.conf, and systemd-resolved on Ubuntu and RHEL.
Memory, Limits & Processes
8 guidesArgument list too long
How to fix the Linux 'Argument list too long' (E2BIG) error: understand ARG_MAX, use xargs and find -exec, split globs, and work around large command lines safely.
Cannot allocate memory
How to fix Cannot allocate memory on Linux: diagnose ENOMEM at fork/alloc time, overcommit policy, PID/thread ceilings, cgroup TasksMax, and per-user ulimits.
fork: Resource temporarily unavailable
How to fix fork: Resource temporarily unavailable (EAGAIN) on Linux by diagnosing ulimit nproc, cgroup pids.max, kernel.pid_max and kernel.threads-max limits.
task blocked for more than 120 seconds
Fix the khungtaskd 'task blocked for more than 120 seconds' warning: understand the uninterruptible D state, diagnose the I/O stall behind a hung task.
Out of memory: Killed process
How to fix Out of memory: Killed process on Linux: diagnose host OOM vs cgroup memory.max, oom_score, overcommit, swap, and container exit code 137.
TCP: out of memory -
Fix the Linux 'TCP: out of memory' and 'Out of socket memory' errors: tune tcp_mem pages, size socket buffers, cap orphaned sockets, and stop dropped data.
Text file busy
How to fix the Linux 'Text file busy' (ETXTBSY) error: find the process running or holding a binary with lsof and fuser, stop it, then replace or overwrite the executable safely.
Too many open files
How to fix Too many open files (EMFILE/ENFILE) on Linux: diagnose ulimit -n, systemd LimitNOFILE, fs.file-max, fd leaks, and inotify watch exhaustion.
Storage & Filesystems
11 guidesBuffer I/O error on dev
Fix the 'Buffer I/O error on dev' and blk_update_request I/O error kernel messages: diagnose bad sectors, medium errors, EIO in apps, and SMART data on a failing disk.
Device or resource busy
How to fix the Linux 'Device or resource busy' (EBUSY) error when unmounting, removing, or killing: find the process holding the mount and release it safely.
EXT4-fs error ... bad extent
Fix the EXT4-fs error 'bad extent/header' that remounts your filesystem read-only. Diagnose ext4 metadata corruption, recover the journal, and run e2fsck safely.
UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
How to fix the Linux 'UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY' boot error: run fsck safely from a rescue shell, repair ext4/XFS, and recover a filesystem that won't auto-check.
Input/output error
How to fix the Linux 'Input/output error' (EIO): diagnose failing disks with SMART and dmesg, distinguish device faults from NFS drops, and recover safely.
mount: wrong fs type, bad option, bad superblock
How to fix the Linux 'mount: wrong fs type, bad option, bad superblock' error: diagnose filesystem type mismatches, corrupt superblocks, missing modules, and bad fstab options.
No space left on device
Fix the Linux 'No space left on device' (ENOSPC) error: diagnose full filesystems, inode exhaustion, deleted-but-open files, reserved blocks, and runaway logs.
Read-only file system
Fix the 'Read-only file system' (EROFS) error in Linux: diagnose kernel-forced remounts after I/O errors, fsck-needed corruption, failing disks, ro fstab, and RAID.
Stale file handle
How to fix the Linux 'Stale file handle' (ESTALE) error on NFS: understand why the file handle went stale, remount the export, and prevent it recurring.
Structure needs cleaning
How to fix the Linux 'Structure needs cleaning' (EUCLEAN) error on ext4 and btrfs: confirm the corruption, unmount, back up, and run the correct repair safely.
Transport endpoint is not connected
How to fix the Linux 'Transport endpoint is not connected' (ENOTCONN) error from a dead NFS or FUSE mount: force-unmount the stale mount and remount cleanly.
Permissions, Exec & Auth
12 guidesbad interpreter: No such file or directory
How to fix the Linux 'bad interpreter: No such file or directory' error: CRLF line endings, wrong shebang paths, missing interpreters, and BOM issues explained.
cannot open shared object file
Fix 'error while loading shared libraries: cannot open shared object file' on Linux using ldd, ldconfig, and LD_LIBRARY_PATH to resolve missing libraries.
chown: invalid user: '<name>
How to fix the Linux chown: invalid user error: the user does not exist in NSS, a typo, an unresolvable LDAP/SSSD account, or a UID needing --from. Diagnose with getent and id.
command not found
Fix the 'bash: command not found' error in Linux: diagnose missing packages, broken PATH, non-login shells, stale hash cache, sudo secure_path, and bad shebangs.
Exec format error
How to fix the Linux 'Exec format error' (ENOEXEC): wrong CPU architecture, missing shebang, corrupt binaries, and multi-arch container images explained.
No such file or directory (when the file clearly exists)
How to fix Linux 'No such file or directory' when the file exists: missing ELF interpreter/loader, wrong architecture, and missing shared libraries explained.
Operation not permitted
How to fix the Linux 'Operation not permitted' error (EPERM): missing capabilities, the immutable bit, seccomp, user namespaces, SELinux and AppArmor denials explained.
passwd: Authentication token manipulation error
How to fix the Linux passwd: Authentication token manipulation error — usually a full or read-only filesystem or an immutable /etc/shadow, not a bad password. Diagnose and repair.
Permission denied
How to fix the Linux 'Permission denied' error (EACCES): file modes, ownership, ACLs, noexec mounts, missing execute bit, SELinux and AppArmor denials explained.
Permission denied (publickey)
Fix SSH 'Permission denied (publickey)': diagnose missing keys, authorized_keys, file permissions, StrictModes, wrong user, ssh-agent, and disabled key types.
Segmentation fault (core dumped)
How to fix the Linux 'Segmentation fault (core dumped)' error: capture cores with coredumpctl, analyze with gdb, read dmesg segfault lines, and find the faulting library.
su: Authentication failure
How to fix the Linux su: Authentication failure error: wrong password, a locked or expired account, PAM faillock lockout, or a nologin shell. Diagnose on Ubuntu and RHEL.
systemd & Services
7 guidesA stop job is running for...
How to fix the Linux 'A stop job is running for...' slow-shutdown error: find the hanging unit, tune DefaultTimeoutStopSec and TimeoutStopSec, and fix KillMode and reboots.
Dependency failed for /<mountpoint>
How to fix the Linux 'Dependency failed for /<mountpoint>' systemd error: diagnose failed mount units, fstab entries, RequiresMountsFor, and nofail options to boot cleanly.
Failed to connect to bus: No such file or directory
How to fix the Linux 'Failed to connect to bus: No such file or directory' error: set XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS, fix --user vs system, and run systemd in containers.
Failed to start
Fix the systemd 'Failed to start unit' error: diagnose status=203/EXEC missing binaries, bad WorkingDirectory/User, failed dependencies, start-limit-hit, and sandboxing.
Job timed out
Fix the systemd 'Job timed out' error: tune TimeoutStartSec, fix Type=notify units missing READY=1, hung ExecStart, and device/mount timeouts.
Start request repeated too quickly
How to fix the Linux 'Start request repeated too quickly' systemd error: reset the start limit, fix crashing ExecStart and Restart directives, and tune StartLimitBurst.
Unit <name>.service not found
How to fix the Linux 'Unit <name>.service not found' systemd error: locate missing unit files, fix typos and enablement, run daemon-reload, and correct WantedBy links.
Boot & Kernel
3 guidesALERT! UUID=... does not exist. Dropping to a shell!
How to fix the Linux initramfs 'ALERT! UUID=... does not exist. Dropping to a shell!' error: repair fstab/UUID mismatches after a clone or resize and rebuild the initramfs.
grub rescue> ... no such device
How to fix the Linux 'grub rescue> error: no such device' boot error: locate the boot partition, set prefix/root, load the normal module, and reinstall GRUB on Ubuntu and RHEL.
Kernel panic
How to fix the Linux 'Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block' error: repair a missing initramfs, wrong root=, or missing storage driver.
Package Management
7 guidesCould not get lock /var/lib/dpkg/lock-frontend
How to fix the Linux 'Could not get lock /var/lib/dpkg/lock-frontend' error: find the process holding the apt/dpkg lock, wait for unattended-upgrades, and recover safely.
dpkg was interrupted, you must manually run dpkg --configure -a
How to fix the Linux 'dpkg was interrupted, you must manually run dpkg --configure -a' error: recover a half-configured package database on Debian and Ubuntu safely.
Failed to download metadata for repo
How to fix the Linux dnf 'Failed to download metadata for repo' error on RHEL, Rocky, and Alma: repair repo URLs, proxy, TLS, clock skew, and clean the dnf cache.
Hash Sum mismatch
How to fix the Linux apt 'Hash Sum mismatch' error on Ubuntu and Debian: clear the package lists cache and track down the caching proxy or stale mirror behind it.
NO_PUBKEY / the following signatures couldn't be verified
How to fix the Linux apt 'NO_PUBKEY' and 'the following signatures couldn't be verified' error on Ubuntu using the modern signed-by keyring in /etc/apt/keyrings.
rpmdb: BDB0113 Thread/process failed
How to fix the Linux rpmdb: BDB0113 Thread/process failed error caused by a corrupt RPM Berkeley DB: verify, back up, and rebuild /var/lib/rpm safely on RHEL/Rocky.
The following packages have unmet dependencies
How to fix the Linux 'The following packages have unmet dependencies' error on Ubuntu and Debian: resolve held, broken, and conflicting apt packages step by step.
More for Linux & infra engineers
- AI for Linux Admins — prompts, guides, and tools.
- OpenStack Troubleshooting — control-plane runbooks.
- AI Prompt Library — copy-paste Linux/DevOps prompts.
- DevOps Guides — the full knowledge base.