Error → fix
Errors and symptoms: 952. Find yours and go to the fix in the article.
Terminal messages
-
nginx rejects the configuration
nginx: configuration file … test failed
nginx -tprints the full error with the file and the line number. -
No permission for the file or directory
permission denied
Check the owner and mode with
ls -l, and usesudowhen root is required. -
systemd does not know this unit
could not be found
Check the name with
systemctl list-units --type=service; a changed file needsdaemon-reload. -
Command not found
command not found
Check for a typo and the path with
whichortype. The package may be absent. -
No such file or directory
no such file or directory
Check the path with
lsandpwd. A relative path starts from the current directory. -
The service failed to start
job for … failed because
The reason is in
systemctl status <service>andjournalctl -u <service> -n 50. -
The port is already in use
address already in use
ss -tlnpshows who holds the port. Stop it or take another port. -
No space left on the device
no space left on device
df -hshows free space,du -xh --max-depth=1 /shows the big directories. -
mount does not recognise the file system
wrong fs type
Most often the device has no file system yet, and
lsblk -fshows an empty FSTYPE. Mount the partition, not the whole disk. -
The disk has no partition table
unrecognised disk label
This is how a new disk looks.
parted mklabelcreates the table and erases any old one, so check the disk name withlsblk. -
The file was not attached as a loop device
failed to set … loop device
Only root can attach loop devices, so run it with
sudo.losetup -ashows what is already attached. -
No access to the Docker service
permission denied while trying to connect to the docker
The Docker socket is open to root and the docker group. Run the command as
sudo docker …. -
The Docker service is not running
cannot connect to the docker daemon
Start it with
sudo systemctl enable --now docker;systemctl status dockershows its state. -
The host port is already taken
port is already allocated
sudo ss -tlnpshows who holds the port. The container was already created — remove it withdocker rmand start again with another left-hand port in-p. - The old Docker builder runs the build legacy builder is deprecated It is a warning; the build goes on. The error, if any, is in the last lines of the output.
-
The image has no such program to run
executable file not found in $path
A common cause is an exec-form
CMDwritten as one string. Split the words —["httpd", "-f"]— and check that the image has the program. -
The kernel buffer is closed to regular users
read kernel buffer failed
Ubuntu sets
kernel.dmesg_restrict = 1— readsudo dmesg -Torsudo journalctl -k. -
The process hit its open files limit
too many open files
Compare
Max open filesin/proc/<PID>/limitswith the files in/proc/<PID>/fd; a service gets a higher limit fromLimitNOFILEin a drop-in. -
The kernel parameter was not changed — root is required
permission denied on key
The line with the new value was printed, but the value is unchanged. Repeat with
sudoand checksysctl <name>. -
Any user can read the swap file
insecure permissions
Swap turns on, but narrow the permissions —
sudo chmod 600 <file>. -
strace cannot attach to the process
attach: ptrace
On Ubuntu only your own children can be traced without root —
sudo strace -p <PID>. -
systemd skipped a unit line
unknown key name
The key is in the wrong section or misspelt — check
systemd-analyze verify <unit>. -
The new password failed the quality check
bad password:
The reason follows the colon (length, character classes, dictionary);
pwscorehelps pick a password first. -
The password was not changed — no tries left
have exhausted maximum number of retries
The quality check rejected every try (
retry=3). Read theBAD PASSWORDreasons above and check a password withpwscore. -
The account is locked after failed logins
the account is locked due to
See the counter with
sudo faillock --user <name>; lift the lock with--resetor wait forunlock_time. -
pam-auth-update leaves hand-edited files alone
local modifications to /etc/pam.d
The profile is not enabled.
--forcerebuildscommon-*and wipes manual lines — add them again afterwards. -
sudo does not work inside a service with NoNewPrivileges
"no new privileges" flag is set
The
no_new_privsflag forbids raising rights. Give the service what it needs throughUser=, a group or a capability. -
The service did not start — the User= user does not exist
status=217/user
Create the user with
useradd --systemor setDynamicUser=yes. -
setcap ran without root
unable to set cap_setfcap
Only root can give capabilities to files — repeat with
sudo. -
This scan type requires root
scan type which requires root
SYN, UDP and OS scans send raw packets — run with
sudoor keep the plain scan without-sS. -
nmap thinks the host is down
host seems down
The host did not answer the discovery probes. Check the address and repeat with
-Pnto scan ports without the check. -
AppArmor denied the program access
apparmor="denied"
The line names the profile (
profile), the path (name) and what was missing (denied_mask). Add the rule to the profile's local file. -
The PostgreSQL setting applies only after a restart
cannot be changed without restarting the server
After
reloadthe old value stays (pending_restart = t). Runsudo systemctl restart postgresql. -
Another user's crontab needs root
must be privileged to use -u
crontab -u <user>works only withsudo:sudo crontab -l -u <user>. -
apt waits for the scheduled update to finish
(unattended-upgr)
unattended-upgrade holds the dpkg lock. Wait for it (
systemctl status apt-daily-upgrade); do not kill it. -
The boot has not finished yet
bootup is not yet finished
Some boot job is still running —
systemctl list-jobsshows which. -
Units wait for each other in a circle
transaction order is cyclic
Two units have
After=on each other — the journal showsFound ordering cycle; remove the extraAfter=. -
The machine booted into emergency mode
you are in emergency mode
Most often an
/etc/fstabline with a missing device. The cause is injournalctl -xb. -
chronyc cannot reach chronyd
506 cannot talk to daemon
The service is not running —
systemctl status chrony. -
This chronyc command is for root only
501 not authorised
makestep,burst,reload sourceschange the service — run them withsudo. -
The time cannot be set by hand while sync is on
automatic time synchronization is enabled
First
sudo timedatectl set-ntp false, after the experiment —set-ntp true. -
systemd-timesyncd is not running
org.freedesktop.timesync1
If chrony is installed, timesyncd is removed —
chronyc trackingshows the state. -
The repository belongs to another user
detected dubious ownership
For a root-owned repository use
sudo git. -
git has no author name and email
author identity unknown
Set them in the repository —
git config user.nameandgit config user.email(withsudofor a root-owned one). -
pull refused because of a local change
would be overwritten by merge
Commit the change or shelve it with
git stash, thengit pullandgit stash pop. -
push rejected — the remote has commits you do not
(fetch first) … [rejected]
git pullfirst, thengit pushagain. -
The branches diverged, git does not know how to reconcile them
reconcile divergent branches
Merge with a merge commit —
git pull --no-rebase. -
A conflict — both sides changed the same lines
conflict (content)
Keep what is needed between the
<<<<<<</>>>>>>>markers, remove the markers and rungit add <file>. -
The inventory has no such machines
could not match supplied host pattern
The inventory was not read or lacks the group from
hosts:— check the-ipath and--list-hosts. -
Ansible cannot find the module
couldn't resolve module/action
A typo in the module name —
ansible-doc <module>shows whether it exists. -
notify calls a handler that does not exist
the requested handler … was not found
The name in
notifymust match the handler'snameletter for letter. -
A template or task uses a variable that does not exist
ansibleundefinedvariable
Set it in
vars:, the inventory or-e, or add| default(...). -
Ansible could not connect to the machine over SSH
unreachable! … failed to connect to the host via ssh
The cause is the ssh text in
msg; check by hand withssh <machine> trueas the same user. -
The module lacks the rights
destination … not writable
The module is not running as root — add
-borbecome: true. -
systemd dropped a job to break a cycle
deleted to break ordering cycle
Two units wait for each other through
After=— one service does not start. Jobs are insystemctl list-jobs.
Basic commands
- The alias is gone after reopening the terminal You created it on the command line but never saved it to ~/.bashrc.
- alias does not work in a script / under sudo That is expected:
- I need to temporarily run the real command The \ prefix (\rm file) or command rm file runs the original, bypassing the alias.
- The job did not run The atd daemon must be running (systemctl status atd).
- The command "was not found" inside at Like cron, at has a minimal environment (though at does save the current env at the time the job is queued — at -c ID shows it).
- I need to cancel it atq (find the id) → atrm <id>.
- at: command not found / no atd The at package isn't installed or the daemon isn't running:
- One-off vs. recurring vs. a service One-off — at; on a schedule — cron/systemd timers; a permanent service — a systemd unit.
- Permission denied {#permission-denied} bash:
- command not found {#command-not-found} backup.sh:
- cannot execute: required file not found {#crlf} bash:
- [[: not found, Syntax error: "(" unexpected {#sh-vs-bash} A bash script was run by sh (dash):
- name: command not found on a line with = {#assignment-spaces} Spaces around =:
- unbound variable {#unbound-variable} backup.sh:
- syntax error: unexpected end of file {#unexpected-eof} A block or a quote is not closed:
- The script breaks on a name with a space {#spaces-in-names} An unquoted variable:
- Works by hand, fails on a schedule {#schedule} Cron and systemd services have a different environment:
- command not found {#missing-command} Check spelling and command lookup.
- A setting exists in a file but is not active {#settings-missing} Identify the session mode and relevant startup file.
- History is empty or differs between sessions {#history-empty} History belongs to a shell session and its configuration.
-
cd: too many argumentscd takes one path. -
cd: not a directoryThe target path is a file, not a directory. -
cd: permission deniedNo x (enter) permission on the directory. - "I cd'd inside a script, and afterward I'm back in the old directory" Every process/script has its own working directory.
- Spaces/colons ended up in a filename date prints with spaces/:
- The time is wrong / the wrong timezone date uses the system timezone.
- Month/weekday names are in English but I need Russian It depends on the locale (LC_TIME).
- I need a timestamp in a script's logs printf '%s %s\n' "$(date -Iseconds)" "message", or use the systemd journal (journalctl adds timestamps itself).
-
-eprinted as literal text The shell isn't bash (behavior differs in sh/dash), or echo is an external binary. - An asterisk turned into a file list echo * without quotes is subject to globbing.
- The newline isn't where I want it echo always adds a trailing \n; to skip it, use -n; to insert one in the middle, use -e "...\n..." or printf.
- command not found, even though the binary exists Its directory isn't in $PATH.
- export worked, but disappeared in a new terminal export only lives in the current session.
- The variable is set in the terminal but not over SSH (or vice versa) Different files for login/non-login (see the table).
- A script/cron/systemd doesn't see the variable cron and systemd units do not read your ~/.bashrc.
- sudo "loses" variables sudo resets the environment (env_reset).
- The script prints OK while the service is down {#ok-but-down} The check reads the code of the wrong command:
- A line in the middle failed, yet the script returned 0 {#last-command} A script returns the code of its last command.
- The script did its job but returned 1 {#last-test} The same cause from the other side.
- Code 127 {#code-127} command not found:
- Code 126 {#code-126} The file was found but cannot run:
- Code 130, 137 or 143 {#signal-codes} A signal stopped the command:
- grep stops a script that uses set -e {#grep-no-match} grep returns 1 when nothing matches.
- cannot open lock file: Permission denied {#permission-denied} The lock file cannot be opened.
- The second run silently vanished {#silent-skip} That is how -n behaves:
- failed to execute: No such file or directory {#failed-to-execute} flock could not find the command (code 69).
- The lock does nothing, runs still overlap {#no-effect} The runs lock different files, or one of them bypasses flock.
- man: the command exists, but there's no page It might be a bash builtin — try help cmd.
- apropos/man -k: "nothing appropriate" The index hasn't been built.
- The man page is too long, you need one flag man cmd, then /-X (search for the flag, n for the next match).
- You don't remember the command's name, only the task apropos <topic> / man -k <topic> searches every page's description.
- You want help with bash syntax (if/for/test) Those are shell builtin constructs:
- The pattern found no files — the command got the literal pattern By default bash leaves an unmatched glob as-is (ls *.xyz → "no such file:
- Hidden files didn't get caught by * * doesn't include files starting with ..
- Spaces/special characters in names break things Quote your variables; for bulk processing, use find -print0 | xargs -0 (see xargs).
-
{a,b}didn't expand There must be no spaces inside: - A short name works but the FQDN does not {#fqdn-fails} Check how the system resolver handles the current name.
- hostname -I returned several addresses {#many-addresses} A machine may have several interfaces and addresses.
- The old name returned after reboot {#name-reverts} A temporary change does not replace persistent configuration.
- invalid option -- 'z' / unrecognized option '--foo' The command has no such option.
- missing operand The command lacks an argument:
- No such file or directory for half a name The shell split a name with a space into two arguments.
- command not found The first word isn't a command the shell knows:
- The quotes aren't closed — the prompt changed to > The shell waits for the closing quote.
- Garbled Cyrillic/characters A non-UTF-8 locale or terminal.
- warning: setlocale: LC_*: cannot change locale The requested locale hasn't been generated.
- A script sorts/parses differently on different machines The locale affects sort, numbers, dates.
- Dates/numbers in an "unexpected" format That's LC_TIME/LC_NUMERIC.
- perl: warning setting locale failed Usually harmless but annoying:
-
mc: command not foundIt's not installed: - Garbled panel borders The terminal isn't UTF-8, or the font is missing the glyphs.
-
Ctrl+Odoes nothing / the shell is empty Ctrl+O shows the subshell. - The mouse selects text instead of the panels Hold Shift while selecting with the mouse — that hands the selection to the terminal instead of mc.
- You saved, but the change didn't take effect for the service The editor only writes the file.
- No permission to save You didn't open it with sudo.
- Long-line wrapping is confusing (configs) nano -w file (or set nowrap) turns off soft wrapping, so long config lines don't look visually "broken".
- Mouse paste breaks / duplicates Terminal paste can be slow with large blocks; for configs this is usually fine.
- More used to vim For servers, know at least the minimum of vim — it's always there; nano sometimes isn't installed (sudo apt install nano).
- Permission denied with sudo … > file Your shell opens the file, not sudo.
- bash: $F: ambiguous redirect The file name in the variable has a space, or the variable is empty.
- bash: out.txt: cannot overwrite existing file noclobber mode is on (set -o noclobber); it forbids > onto an existing file.
- Errors didn't end up in the file > redirects stdout only.
- grep in a pipeline doesn't find the error text The error went to stderr, and a pipe passes only stdout.
- The file is empty after sort file > file The shell truncated file for writing before sort read it.
- echo mangled a string with a dash or a backslash echo "-n", or strings with \, behave unpredictably between shells.
- printf truncated/repeated the output printf applies the format to all arguments, cycling through it.
- You need to build a string from variables printf -v var '%s-%s' "$a" "$b" writes it into a variable with no output.
-
%d: invalid number%d received something that isn't a digit. - pwd: --: invalid option {#invalid-option} The snapshot shows this message for pwd --version:
- The path differs from what you expected {#unexpected-path} A symbolic link can explain the difference without a different directory being involved.
- The current directory was removed {#deleted-directory} If the directory path cannot be recovered, change to an existing directory and check again.
- screen -r: There is no screen to be resumed No such session (closed/rebooted).
- Attached, can't detach ("There is a screen on ... Attached") The session is "stuck" to another terminal:
- Garbled/broken display Ctrl+a then C (clear) or reconnect.
- Mouse scrolling doesn't work screen scrolls through copy mode by default (Ctrl+a [).
- SC2148: Tips depend on target shell {#sc2148} The file has no #!
- openBinaryFile: does not exist {#no-file} There is no file at that path:
- A finding that does not apply {#false-positive} shellcheck does not know your intent:
- shellcheck is quiet, yet the script fails {#silent} shellcheck checks only the text.
- [: =: unary operator expected {#unary-operator} The variable is empty and unquoted:
- [: too many arguments {#too-many-arguments} The value contains a space:
- [: a: integer expression expected {#integer-expected} -eq, -gt and the rest got something that is not a number:
- [-f: command not found and missing `]' {#spaces} A space is missing after [ or before ].
- [: a: unexpected operator {#unexpected-operator} This is how sh (dash) reacts to == inside [ ].
- [ -n $x ] is true for an empty variable {#n-unquoted} Unquoted, the empty value disappears and [ -n ] is left — a check that the string -n is not empty, which is true.
- value too great for base {#octal} [[ 08 -eq 8 ]] and (( 08 )) read a number with a leading zero as octal, and octal has no 8 or 9.
- The link is there, but -e says no {#dangling-link} -e and -f look at the file the link points to.
- I can't exit / everything is being "captured" That's the Ctrl+b prefix.
- sessions should be nested with care You ran tmux inside tmux.
- Sessions disappeared after a reboot tmux keeps sessions in memory — a reboot kills them.
- Mouse scrolling doesn't work Enable set -g mouse on in ~/.tmux.conf and tmux source ~/.tmux.conf (or start a new session).
- Processor information is unknown {#unknown} The implementation did not provide this field.
- The output has no Ubuntu release {#not-ubuntu} uname does not report the distribution release.
- A parser for uname -a stopped working {#summary-parsing} Avoid word positions in the combined summary.
- The server "feels slow" — where to start uptime → if load ≫ core count, find the culprit:
-
lastis empty or looks odd Login logs rotate (wtmp/btmp); older entries are in wtmp.1. - Someone else is editing the config w shows other sessions and their WHAT.
- I'm stuck, everything breaks as I type You're in Normal mode, where letters are commands.
- Can't save: "E212: Can't open file for writing" No permission (you didn't open it with sudo).
- Pasting with the mouse "staircases" the indentation :set paste before pasting (Insert's auto-indent adds extra indentation otherwise), then :set nopaste.
- Accidentally made a mess of edits u undoes step by step; :q!
- Need something simpler nano file — hints at the bottom (see nano).
- A pipeline/grep "doesn't work" inside watch Wrap the whole command in quotes:
- Colors disappeared By default watch strips ANSI color.
- Need to follow a log line by line For logs, tail -f (see files-basics) or journalctl -f (see journalctl) are better; watch is for a "snapshot of state", not a stream.
- Want to stop on a change / on readiness watch -g cmd exits once the output changes (handy as "wait until ready"); watch -e cmd stops if the command errors out.
-
whichfound it, but the command says "not found" (or the reverse) which doesn't know about aliases/builtins/functions and reads its own $PATH, which may differ from the current shell's. - The "wrong" version runs type -a name shows every match along PATH in search order — the first one is what runs.
-
command not foundeven though the package is installed The binary isn't in $PATH (often /usr/local/sbin, ~/.local/bin). - After installing a new version, the old one still runs Bash caches the resolved path to a command in a hash table for the session.
- Passing a user name fails {#extra-name} whoami has no target-user argument.
- Expected student but got root {#wrong-identity} Check whether you are in a privileged shell.
- The UID exists but its name cannot be resolved {#missing-name} The numeric identity may lack an accessible account entry.
- Names with spaces get cut up find ...
- xargs ran on empty input and made a mess Add -r (--no-run-if-empty) — don't run the command with no arguments.
- "Argument list too long" / one call with a huge number of arguments xargs splits into batches itself (a system limit); to control it, use -n N.
- Need to insert the argument somewhere other than the end xargs -I{} cmd ...
- Parallel output gets interleaved With -P, lines from different processes interleave.
Files and directories
- rm deleted the wrong thing There's no recovery:
- No such file or directory, even though the file is right there Usually it's a path issue:
- Permission denied while copying No read permission on the source, or no write permission on the destination directory.
- cp didn't copy a directory fully A directory needs recursive copying:
- The file is busy, space wasn't freed after deleting it As long as a process keeps a deleted file open, the space isn't reclaimed.
- cp: -r not specified; omitting directory The source is a directory and -r is missing.
- cp: cannot stat 'x': No such file or directory There's no source at that path.
- cp: cannot create regular file: Permission denied You can't write to the destination directory.
- The copy is owned by root, not the user sudo cp creates new files as root.
- The copy has different permissions or times Without -p or -a the copy gets the current time and permissions from the umask.
- No space left on device The destination filesystem is full.
- "Script won't run: cannot execute binary file" file script shows the real type.
- The text encoding is in question file -i file shows the charset (utf-8 / iso-8859-1).
- Determining the filesystem type on a partition file -s /dev/sdXN (as root) is a quick way without mounting; for partitioning, see mount.
- file says "data" instead of a specific type No signature matched in the /etc/magic database — either the file is corrupted, or it's an unknown/raw format (for instance, encrypted data looks like a random…
- "Permission denied" clutters the output Drop the errors:
- It searches too deep / across other filesystems -maxdepth N limits the depth (put it BEFORE other conditions); -xdev avoids crossing mount points (see mount).
-
Accidentally deleted the wrong thing with
-deleteAlways run it without an action first (just the listing), confirm the list, then add -delete/-exec rm. - find with -name finds nothing The pattern must be quoted ("*.log"), otherwise the shell expands it before find sees it.
- -exec is slow {} \; runs the command once per file.
- detected dubious ownership {#dubious-ownership} The repository belongs to another user (root here), and git will not work in it under your name:
- Author identity unknown {#identity} The user making the commit has no name and email.
- Your local changes … would be overwritten by merge {#local-changes} The working copy has an uncommitted change to a file the incoming commits change.
- Need to specify how to reconcile divergent branches {#divergent} Both you and origin have commits the other side lacks (git status:
- rejected … (fetch first) {#push-rejected} origin has someone else's commits.
- refusing to update checked out branch {#non-bare-push} A push into an ordinary repository with working files:
- Permission denied (publickey) on push The SSH key is not set up or not on the server — see ssh-keys.
- Accidentally ran reset --hard git reflog remembers where HEAD was — you can go back:
- A broken (dangling) symlink The target was moved or deleted.
- A relative symlink "broke" after a move A relative path is resolved from the link's own directory, not the current one.
-
ln -sinto an existing directory created the link INSIDE it If name is an existing directory, ln -s target dir drops the link at dir/target. - ls: cannot access 'x': No such file or directory There is no such path relative to the current directory.
- ls: cannot open directory: Permission denied Reading the listing needs r on the directory, entering it needs x.
- The file isn't in the list, but it exists Its name starts with a dot — add -a.
- The directory shows 4096 bytes but holds gigabytes ls -l shows the size of the directory entry, not of its contents.
- The name is printed in quotes: 'my file' That's how ls shows names with spaces and special characters so you can paste them into a command.
- A script parses ls output and breaks on spaces ls output is meant for people.
-
mkdir: cannot create directory 'x': File existsThe directory already exists. -
mkdir: cannot create directory 'a/b/c': No such file or directoryThe intermediate directories (a, a/b) don't exist. -
Permission deniedNo w+x permission on the parent directory. -
The permissions aren't what
-mspecified -m sets the resulting directory's permissions directly (umask doesn't apply to it), but the intermediate directories created by -p still get the regular umask. - mv: cannot stat 'x': No such file or directory There's no source at that path.
- mv: cannot move 'src' to 'dst/src': Directory not empty dst already holds a non-empty directory with the same name.
- Permission denied mv needs write permission on both directories — source and destination; the file's own permissions don't matter.
- The file is gone after mv The destination was not a directory but a file with that name, and mv overwrote it.
- mv: invalid option -- 'l' with the name -file.txt mv reads a name starting with a dash as a bundle of options -f -i -l … and trips on the first unknown letter.
- A path with spaces "fell apart" Always quote it:
-
realpath: No such file or directoryBy default, realpath requires the path to exist. - You need the path without resolving symlinks realpath follows symlinks.
- Forgot RESTIC_PASSWORD The repository is encrypted — without the password the data cannot be restored.
- The first backup is slow/large The first snapshot is full, later ones only carry changes (deduplication).
- The repository has bloated restic forget --keep-* --prune applies the retention policy and actually deletes unused blocks (--prune).
- locked repository An interrupted operation left a lock behind:
- Verifying a backup restic check (plus --read-data periodically) and a test restore — a backup without a verified restore is not a backup.
- rm: cannot remove 'dir': Is a directory The argument is a directory.
- rm: cannot remove: Permission denied You can't write to the directory holding the file.
- rm: remove write-protected regular file? The file lacks w.
- rm: cannot remove: Operation not permitted The file has the immutable attribute (lsattr file shows i), or it's someone else's file in a sticky directory like /tmp.
- Disk space wasn't freed A process still has the file open:
- Argument list too long The pattern matched too many files for one command.
- --delete removed something needed --delete makes dst an exact copy of src.
- Copied to the wrong place / a duplicated directory The trailing slash on the source (see the slash section above).
- It copies everything again every time Comparison is by mtime and size; if time "drifts" (different filesystems or time zones), add -c (checksum comparison) or --modify-window=1.
- Permissions/owners weren't preserved You need -a (or -o/-g/-p individually); for foreign owners, root rights on the receiving side.
- Slow with lots of small files Normal (rsync checks every file).
- "I didn't touch the file, but mtime is fresh" The file was rewritten (an editor saves in place) or a process appended to it.
-
ls -lshows a large size but no space is used A sparse file. - A symlink's permissions don't match expectations Symlinks on Linux almost always show 777 — these permissions don't affect access to the target, which is checked on the target file itself.
- A broken symlink (points "nowhere") The target was deleted or moved.
- You copied something and got the link itself (or the other way around) cp follows a symlink by default (it copies the target).
- du/df disagree because of a hard link Hard links share the same blocks — du counts them once (which is confusing).
- rsync "bloated" the backup Without -H, rsync doesn't preserve hard links (it copies the data again for each name).
- tar: Removing leading '/' Normal:
- Extracted it and scattered files into the current directory (a "tar bomb") An archive with no top-level directory.
- Permission denied / owners were lost Extract system backups as root and with -p (permissions) / --same-owner (owners, the default for root).
- Very slow / a large archive xz (J) compresses harder but is slower; gzip (z) is a balance; for multi-core, use pigz (tar -c dir | pigz > a.tgz).
- Don't overwrite existing files on extraction --keep-old-files (error if it exists) or --skip-old-files (skip it).
Text and search
- cat: /etc/shadow: Permission denied Only root or the file's group can read it.
- Permission denied with sudo cat > /etc/file The > redirection is done by your shell, without root rights, before sudo even starts.
- cat: /etc: Is a directory The argument is a directory.
- The terminal prints garbage after cat You printed a binary file, and control bytes switched the terminal's mode.
- The file flew by, only the end is visible cat doesn't stop at each screen.
- Empty output with a space delimiter There is more than one space between words, so the field you asked for is empty.
- cut prints the whole line The line has no -d delimiter, and cut prints it unchanged.
- cut: you must specify a list of bytes, characters, or fields You did not say what to cut.
- cut: the delimiter must be a single character -d got more than one character.
- cut: fields are numbered from 1 Fields are numbered from one:
- cut: only one type of list may be specified The command has both -f and -c.
- Cyrillic letters are cut in half On Ubuntu cut -c counts bytes, like -b, and a Cyrillic letter takes two bytes in UTF-8.
- patch: Hunk FAILED / .rej files The context in the target file has already changed.
- I don't know which -p level to use git patches usually need patch -p1 (strips a/, b/).
- Too much noise in the diff (whitespace/CRLF/case) diff -w (ignore whitespace), -i (case), -B (blank lines).
- Compare command output, not files diff <(cmd1) <(cmd2) — process substitution (bash).
-
grep itself shows up in
ps aux | grepA classic. - Special characters in the pattern get treated as regex A dot, brackets, + are regex.
-
\d,\w, lookahead don't work Basic/extended grep doesn't know them — you need -P (PCRE): - I expect matches, but grep is silent Check the case (-i), the right file, and that the data is actually arriving.
- Too slow over a large tree Exclude directories (--exclude-dir), or use ripgrep (rg) — noticeably faster.
- An unexpected command still runs after clearing {#other-definition} The name may identify a function or alias.
- The table is empty {#empty-table} This is valid, for example after clearing it.
- Another terminal did not change {#other-shell} Another shell has its own context.
- head: cannot open 'x' for reading: No such file or directory There's no file at that path.
- head: invalid number of lines -n must be followed by a number:
- The output stops in the middle of a line You used -c (bytes) instead of -n (lines).
- The line you need isn't in the output It's past the first ten.
- jq: error: Cannot index ... The structure isn't what you expect.
- There are extra quotes in the output jq prints strings with quotes.
- Invalid JSON on the input jq fails on non-JSON.
- You need to substitute a shell variable Don't paste it into the filter text — use --arg name val (a string) or --argjson (a number/JSON), and reference it inside as $name.
- How to quit less q.
- Pattern not found The word isn't below the current position.
- "file" may be a binary file. See it anyway? The file is binary, and reading it as text makes no sense.
- ESC[31m and similar garbage instead of colors The program printed color codes, and less shows them as characters.
- Missing filename less was started with no file and no pipe.
- grep 'a|b' finds nothing {#bre-alternation} Without -E, | is a plain character and grep looks for the string a|b literally.
- \d matches the letter d {#backslash-d} \d exists only in PCRE.
- Unmatched ( or ( {#unmatched} A bracket in the pattern is not closed:
- The dot matches too much {#dot} grep -o '10.20.0.15' also finds the start of 10.20.0.150:
- The shell expanded the asterisk {#quote-pattern} Unquoted, grep error.* app.log may let the shell replace error.* with matching file names.
- sed -i changed nothing {#no-change} The pattern matched no line.
- More was replaced than intended {#too-much} The pattern is wider than needed:
- unterminated `s' command {#unterminated} sed 's/a/b' is missing the last delimiter.
- unknown option to `s' {#unknown-option} The pattern or the replacement contains /, and sed took the rest for flags.
- invalid reference \1 on `s' command's RHS {#invalid-reference} The replacement has \1, but the pattern has no group:
- awk: unexpected newline or end of string {#awk-syntax} A brace or a quote in the program is not closed:
- awk prints empty fields {#awk-empty} The line is split with the wrong separator:
- 10 comes before 9 The comparison is textual.
- sort -k2 does not sort by the second field only -k2 means "from field 2 to the end of the line", so ties are decided by the following fields.
- Upper and lower case are not in the order you expected The locale decides the text order.
- sort: cannot read: x: No such file or directory There is no file at that path.
- sort: invalid number at field start -k needs a field number:
- Numbers with leading spaces sort oddly Without -n or -b, leading blanks take part in the comparison.
- After sort file > file the file is empty The shell truncated the file for writing before sort read it.
- sort doesn't sort numbers by magnitude By default, sorting is lexicographic:
- uniq didn't remove duplicates uniq only collapses adjacent identical lines, so it needs sort before it:
- cut doesn't see the columns The default delimiter is a tab.
- wc -l shows one line fewer A file's last line without a trailing newline isn't counted.
- Cyrillic breaks in tr tr works on bytes, not characters:
- tail -f went quiet after log rotation logrotate renamed the file and created a new one, while tail -f keeps reading the old one.
- tail: cannot open: Permission denied System logs are readable by root and the adm group.
- tail: cannot open 'x' for reading: No such file or directory The file doesn't exist — maybe the service logs to journald instead of a file.
- New lines show up late The program buffers its output, not tail.
- Ctrl+C doesn't bring the prompt back Click the terminal so it has focus and press Ctrl+C again:
-
teeoverwrote the file instead of appending Without -a, tee truncates the file. - The exit code is always 0, even though the command failed In a cmd | tee pipeline, the exit code comes from the last command (tee).
- Writing to a root-owned file fails Use | sudo tee, not sudo cmd >.
- uniq did not remove the repeats The repeats are not adjacent.
- Lines look identical but are not collapsed They differ in invisible characters:
- cut does not pick the number from uniq -c output The number is padded with spaces, and cut -d' ' sees empty fields.
- uniq: x: No such file or directory There is no file at that path.
- wc -l shows one line fewer wc counts newlines.
- There is an extra file name in the output The name is printed when the file is an argument.
- wc -c and wc -m give different numbers -c counts bytes, -m counts characters according to the locale.
- ls | wc -l gives the wrong number of files ls without -A skips hidden files, and ls -l adds a total line.
- wc: x: Is a directory wc reads files, not directories.
Users and permissions
- Password expiry changed instead of account expiry {#wrong-field} Compare the fields in sudo chage -l labpaused.
- The user resolves but a local change fails {#nonlocal-account} The record may come from an external NSS source.
- chmod 777 "just in case" Almost always wrong and dangerous (especially on directories/web roots).
- A shared directory for a team is not 1777 1777 (sticky bit, world-writable) is the mode for public directories like /tmp:
- Recursion broke executability chmod -R 644 dir strips x from directories → you can no longer enter them.
- Changed the owner — the service stopped reading the files Many daemons run as their own user (www-data, postgres).
- Permissions look right, but access is missing / extra ACL is in play.
- I granted rw to a named user, but they still cannot write The mask is capping it:
- ACL entries are not inherited by new files You need default ACL on the directory (setfacl -d -m ...).
- ACL "disappeared" after a copy or backup cp does not carry ACL over by default — use cp -a/--preserve=all, rsync -A, or tar --acls.
- The filesystem does not support ACL It needs the acl mount option (usually on by default on ext4).
- Permission denied when running a script The x bit is missing:
- Can't write to a directory, even though you have w on the file Creating/deleting/renaming a file depends on permissions on the directory (w+x), not on the file itself.
- The web server can't read files (403) nginx runs as www-data — it needs r on the files and x on every directory along the path.
- Access should work, but it doesn't ACLs may be in play (a + in ls -l), or AppArmor (look for apparmor ...
- An SGID directory: new files have the wrong group SGID sets the group for new files, but existing ones and files moved in with mv need chgrp -R by hand.
- name - No such file or directory There's no part with that name.
- name - Permission denied The directory on the line above has no x for whoever ran namei.
- namei shows everything open, but access fails namei doesn't show ACLs, AppArmor, or the groups a process got when it started.
- The file is 644, yet it can't be read The file's own permissions are checked last.
- The service runs although the shell is blocked {#service-still-runs} This can be expected:
- sudo still permits a command as that user {#sudo-still-works} Inspect sudo rules.
- passwd: Authentication token manipulation error passwd couldn't change the password.
- passwd: password unchanged The closing line after any such failure.
- passwd: You may not view or modify password information A regular user is trying to see or change someone else's password.
- The user still logs in after passwd -l They log in with an SSH key:
- I type the password and nothing appears That's by design:
- A new file in the shared directory has a personal group The directory has no setgid (ls -ld shows x rather than s for the group) — run chmod g+s.
- A colleague deleted my file The directory has no sticky bit, and the group has w.
- rm: cannot remove 'x': Operation not permitted The file is someone else's, and the directory has the sticky bit (t or T at the end of ls -ld).
- chmod 775 did not clear setgid on a directory GNU chmod with a three- or four-digit number does not clear setuid and setgid on directories.
- chmod: changing permissions of 'x': Operation not permitted Only the file's owner and root can change its permissions.
- setuid on a script does nothing The Linux kernel ignores setuid on #!
- Files in a shared directory are not group-writable The creator's mask is 022:
- Which mask a command run as another user gets sudo -u alice opens a PAM session, and pam_umask sets alice's mask:
- The mask changed, but old files are the same The mask applies only at creation.
- A new script is not executable The mask never gives files x.
- bash: umask: 9: octal number out of range The mask uses octal digits 0–7:
- useradd: Permission denied / cannot lock /etc/passwd The command ran without root.
- useradd: user 'alice' already exists The name is taken.
- useradd: group 'devs' does not exist A group in -G or -g must exist beforehand:
- The user exists but can't log in No password is set — run sudo passwd alice.
- A strange shell instead of bash: no history or completion The user was created without -s and got /bin/sh.
- Could not chdir to home directory on login The user was created without -m, so there's no home directory.
- usermod: user alice is currently used by process 1234 The name, UID or home directory can't change while the user is logged in.
- usermod: group 'devs' does not exist A group given to -g or -G must exist.
- Added to a group, still no access The session and services hold the old group list.
- Groups vanished after usermod -G That's -G without -a:
- gpasswd: user 'alice' is not a member of 'docker' The user was never in that group — check id -nG alice.
- Added to a group — it has no effect Group membership applies on the next login.
-
Accidentally replaced the groups (
-Gwithout-a) Restore the needed ones: - Can't delete a user — "currently used by process" End its processes (pkill -u alice, see processes) or use userdel -f.
- Login denied, even though the password is correct The account/password is locked (passwd -l/chage -E in the past) or the shell is nologin.
- Files show the "wrong" group An SGID directory only assigns its group to NEW files; recursively chgrp -R the old ones (see permissions, chmod-chown).
Processes
- Permission denied on another user's process {#permission-denied} fd, environ, cwd, exe, io, maps of another user's process are readable by root only.
- sudo is there, yet Permission denied {#sudo-redirect} The < and > redirections are done by your own shell without root rights; sudo applies to the command only.
- No such file or directory {#no-such-pid} The process has ended, and its directory went with it.
- environ lacks a variable that was set {#environ-stale} The variable was set after the process started.
- The process died after closing SSH Launched with &, it is tied to the session and gets SIGHUP on logout.
- A background job's output clutters the terminal Redirect stdout and stderr:
- Ctrl+Z "froze" a process It wasn't killed — the process is suspended (stopped, state T).
- The script finished, but background jobs are still running/orphaned Add wait at the end, or trap 'kill 0' EXIT to kill the process group on exit.
- A process was "killed", logs mention memory cgroup / oom-kill The service hit its cgroup's MemoryMax — the kernel killed it (a cgroup-OOM, not a global one).
- A service is "eating" all the CPU/disk Limit it through systemd:
- A container can't see other processes/network — that's normal It's by design (namespaces isolate).
- Where to see actual usage by service systemd-cgtop (like top, but by cgroup/service) — shows right away which service is loading the system.
- pidstat -d shows nothing {#pidstat-empty} Two reasons.
- The first iostat line looks different {#first-report} It holds averages since boot, including the whole boot of the system.
- %util is 100, yet everything works {#util-100} The device serves requests in parallel, and %util counts only the time when anything at all was busy.
- ionice does not help {#ionice-none} The none disk scheduler ignores classes:
- iotop: command not found {#no-iotop} iotop is not installed on the training machine.
- kill: (12345) - No such process There's no process with that PID anymore:
- kill: (1) - Operation not permitted The process belongs to another user or root.
- The process is still listed after kill State Z (zombie):
- The process came back after kill systemd or another supervisor restarts it.
- kill: invalid signal specification There's no such signal — usually a typo in the name.
- High load, but the CPU is idle {#high-load-idle-cpu} top shows 90.9 id, and the load on one CPU is 2.90.
- A D process ignores kill -9 {#kill-d} The signal waits for the kernel operation to end.
- Is a load of 1.00 on one CPU a lot? {#one-per-cpu} There is no queue:
- Inside a container the load is the whole machine's {#containers} There is one /proc/loadavg per kernel:
- High st on a virtual machine {#steal} st (steal) means the VM needed the CPU, but the hypervisor gave it to other machines.
- df shows "full", du doesn't A file that's deleted but still held open by a process doesn't free its space.
- umount: target is busy Something is holding the filesystem:
- A port is in use, but by what? sudo lsof -i :PORT -nP or ss -tlnp.
- A process is "leaking" file descriptors sudo lsof -p PID | wc -l shows how many are open; compare against the ulimit -n limit.
- lsof is slow It's resolving DNS/ports/mounts — add -nP; with a stuck NFS mount it can hang on the mount itself.
- free is almost zero {#low-free} Normal:
- The server is slow, si and so grow {#swapping} Memory is short, and the kernel shuffles pages between memory and swap.
- A process ended, the log says Killed process {#oom} Memory ran out and the kernel ended the process — see oom-killer.
- mkswap or swapon: insecure permissions 0644 {#insecure-permissions} mkswap prints insecure permissions 0644, fix with:
- swapon failed: Device or resource busy {#busy} The file is already on.
- Swap is gone after a reboot {#swap-after-reboot} swapon lasts until a reboot.
- swap.img.swap in the failed list {#swap-unit-failed} systemd makes a <path>.swap unit for every swap line in fstab.
- vm.swappiness is back to 60 {#swappiness-reset} The value was set with sysctl vm.swappiness=… — it lives until a reboot.
- A service restarts in a loop {#restart-loop} systemctl status shows activating (auto-restart) (Result:
- A process vanished without a line in its log {#silent-death} SIGKILL lets the program write nothing.
- Result=exit-code, status=137 {#exit-code-137} The main shell process managed to exit by itself — with code 137 after OOM killed its child — before systemd received the OOM event:
- OOM with free memory {#oom-free-memory} free -h shows the memory of the whole machine, while the OOM happened in a cgroup.
- OOM killed the wrong process {#wrong-victim} The process in the invoked oom-killer line only asked for memory at the moment of shortage.
- pattern that searches for process name longer than 15 characters The process name is cut to 15 characters, so a longer pattern matches nothing.
- pgrep -f finds an extra process The pattern turned up in someone else's command line — for example, a bash -c shell that itself runs pgrep -f ….
- pgrep prints nothing Nothing matched; the exit status is 1.
- pgrep: invalid user name There's no user with that name.
- A process is hogging CPU top (or ps aux --sort=-%cpu | head) → find the PID → wait it out / renice / kill.
- A memory leak / OOM ps aux --sort=-%mem | head; in the journal — journalctl -k | grep -i oom (the kernel killed something under memory pressure, see oom-killer).
-
A zombie process (
Z/defunct) Harmless by itself — it's waiting for its parent to reap it (wait). - kill doesn't kill it (even -9) The process is in state D (uninterruptible sleep, waiting on I/O) — kill can't help; wait for the I/O to finish or investigate the disk/NFS.
- Which process opened a port/file For a port — ss -tlnp; for a file/directory — lsof.
- A process eats CPU, but ps shows little %CPU %CPU in ps is the average over the process's lifetime, not "right now".
- error: user name does not exist ps -u expects an existing name or UID.
- The process is listed, but kill doesn't help State Z — the process has already exited and can't be killed:
- The command line is cut off ps fits output to the window width.
- The terminal has not displayed a prompt {#no-prompt} The foreground command is still running.
- An error appears instead of a delay {#invalid-duration} Check the operand:
- attach: ptrace(PTRACE_SEIZE, …): Operation not permitted {#attach-denied} ptrace_scope = 1 forbids attaching to a process that is not your child.
- Program output is mixed with strace {#mixed-output} Both write to the terminal.
- Strings are cut: "hello-wo"... {#truncated} strace shows 32 characters of a string, the rest is ....
- No calls from children {#no-children} A child process does the work, and strace without -f does not see it.
- temp-path '.' must be readable and writeable {#temp-path} --hdd writes files to the current directory, and the student cannot write to /.
- gave up trying to mmap, no available memory {#no-memory} The full line is vm:
- stress-ng runs and never ends {#runs-forever} --timeout is missing:
- note and cpu-method messages in the output {#notes} note:
- High load, idle CPU {#high-load-idle-cpu} Tasks are in state D.
- High wa: who writes to the disk {#high-wa} Without sudo, pidstat -d shows only your own processes:
- free is almost zero {#low-free} The kernel keeps free memory busy with the page cache and gives it to programs on demand.
- sar prints only LINUX RESTART {#sar-empty} History collection is off:
- pidstat shows nothing {#pidstat-empty} pidstat prints only processes that did something during the interval.
- Load average is high, but the CPU is nearly idle The queue holds processes in state D waiting on the disk.
- free is almost zero — out of memory? No, if buff/cache and avail Mem are large:
- A process shows 150 %CPU The percentage is per core:
- How to quit top q.
- Garbage and terminal codes when piping Without -b, top draws the screen with control codes.
- Too many open files {#emfile} The process hit its soft nofile limit (error code EMFILE, number 24):
- cannot modify limit: Operation not permitted {#cannot-modify} The soft limit is being raised above the hard one, or the hard one above its current value without root.
- Raised it in limits.conf, the service did not notice {#limits-conf-service} limits.conf affects user logins through PAM.
- systemctl show prints the new limit, the service fails as before {#needs-restart} The service was not restarted after daemon-reload:
- fork: retry: Resource temporarily unavailable {#nproc} The user hit the nproc process limit (ulimit -u).
- Permission denied on connect nginx logs connect() to unix:/run/app/app.sock failed (13:
- No such file or directory nginx — (2:
- Connection refused although the file is there The file is left over from a stopped process — ss -xl does not list it.
- Address already in use The server cannot create the socket:
- The PID is not a child of this shell {#not-a-child} Check where the task was started.
- The status belongs to an unexpected command {#overwritten-status} Another command ran between waiting and reading $?.
Services and systemd
- The server doesn't answer queries Run named-checkconf (any errors?), check the service is active, listening on 53 (ss -tulnp), and the port is open in firewall (53/udp and 53/tcp).
- I changed a zone — still old data You didn't bump the serial in the SOA, or didn't reload (rndc reload).
- SERVFAIL An error in the zone (named-checkzone), a broken delegation, or DNSSEC.
- It only resolves locally Check allow-query / listen-on in named.conf.options — is it listening on the right address and letting clients in.
- 506 Cannot talk to daemon {#cannot-talk} chronyd is not running:
- 501 Not authorised {#not-authorised} Commands that change the service state — makestep, burst, reload sources — are for root:
- sources is empty {#no-sources} The server name does not resolve:
- Source ^? {#unreachable} The server has never answered (Reach 0):
- Leap status: Not synchronised {#not-synchronised} There is no usable source:
- Set the clock by hand, and it went back {#clock-reverted} chronyd brings the time back to the source with a step, as in chrony.
- timedatectl timesync-status: Failed to query server {#timedatectl} timesync-status asks systemd-timesyncd, and the chrony install removed it.
- A cron job does not run Cron has a minimal $PATH and no interactive-session environment (aliases, variables from ~/.bashrc) — use absolute paths to commands and files, do not rely on…
- A timer did not fire while the machine was off Add Persistent=true — it runs the missed job after the machine comes back up.
- I don't know when the next run is systemctl list-timers --all shows every timer, including inactive ones, with the last and next run times.
- A user's crontab job is not visible in the system crontab crontab -e edits the current user's crontab (stored under /var/spool/cron/crontabs/) — separate from the system files /etc/crontab and /etc/cron.d/*, where an…
- Clients aren't getting an address Is the service listening on the right interface (INTERFACESv4)?
- Address conflict / two DHCP servers on the network Two servers are handing out from overlapping pools.
- A MAC reservation isn't taking effect Check the exact MAC (hardware ethernet) and that the address is outside the dynamic range.
- Panel: "No data" Did the data source pass Save & Test?
- Data source: bad gateway / connection refused Grafana can't reach the data source.
- Forgot the admin password sudo grafana-cli admin reset-admin-password <new-password> (or an environment variable at startup).
- The dashboard disappeared after redeploying If it wasn't provisioned, dashboards live in the database (/var/lib/grafana/grafana.db).
- 502 behind a reverse proxy If Grafana sits behind nginx/haproxy on a subpath, set root_url and serve_from_sub_path in grafana.ini, or links/login break.
- 503 Service Unavailable No "live" backends:
- All requests go to one server balance isn't set, or cookie/source stickiness is enabled.
- The config doesn't apply haproxy -c -f ...
- Can't see the client's real IP on the backend Add option forwardfor and read X-Forwarded-For on the backend/nginx (real_ip).
- Timeouts/disconnects under load Tune timeout connect/client/server in defaults and maxconn.
- sudo hangs for a moment after changing the name The new name doesn't resolve locally.
- The name "reverted" after a reboot cloud-init or DHCP is resetting it.
-
hostname -fdoesn't return an FQDN There's no domain-qualified record in /etc/hosts/DNS. - Same machine-id on cloned VMs When cloning an image, machine-id must be unique, or DHCP leases and journals get confused.
- VIP is up on both nodes at once (split-brain) The nodes don't see each other's VRRP advertisements.
- The VIP doesn't move when the application fails There's no track_script — the VIP stays as long as the node is alive, even if the service died.
- The VIP "flaps" back and forth The vrrp_script is too sensitive, or a recovered MASTER takes the VIP back.
- virtual_router_id conflict Within one L2 segment, virtual_router_id must be unique per group; a clash with another group breaks the election.
- Where's the VIP right now, what's happening ip a on each node (the VIP only shows on the MASTER), journalctl -u keepalived for the state transitions (see ip).
- virsh: failed to connect to the hypervisor libvirtd isn't running (systemctl status libvirtd), or you lack permissions — the user must be in the libvirt group.
- The VM won't start virsh start vm1 prints an error; check journalctl -u libvirtd and the log at /var/log/libvirt/qemu/vm1.log for details.
- The VM has no network The virtual network isn't running:
- Can't get into the VM virsh console vm1 (needs serial enabled in the guest OS) — exit with Ctrl+].
- Someone else's site answers {#wrong-site} The request's Host matched no server_name, so the default server answered.
- 404 Not Found {#not-found} error.log has the path nginx built:
- 403 Forbidden (13:
- 502 Bad Gateway {#bad-gateway} nginx did not open a connection to the backend.
- 504 Gateway Time-out {#gateway-timeout} There is a connection but no answer:
- nginx -t: test failed unexpected "}" in …:5 — the line before } has no ;; a duplicate default server for 0.0.0.0:80 — default_server is set in two blocks on one port; open()…
- conflicting server name {#conflicting-server-name} [warn] conflicting server name "docs.lab.test" on 0.0.0.0:80, ignored — one name sits in two blocks on one port.
- key values mismatch {#key-mismatch} SSL_CTX_use_PrivateKey(…) failed (… key values mismatch) — the first certificate in the ssl_certificate file does not match the key.
- The new certificate is not served {#reload} nginx reads certificates at start and on reload.
- The service does not start: port in use sudo ss -tlnp | grep ':80 ' shows who holds the port.
- A new listen did not apply {#listen-change} Changing the address on the same port (listen 80 → listen 127.0.0.1:80) does not work through reload:
- Mail isn't going out / it's stuck in the queue mailq shows the reason next to each message.
- Relay access denied Postfix doesn't forward mail for strangers (anti-relay).
- Mail is landing in spam You need SPF/DKIM/DMARC records in DNS and a correct PTR (rDNS).
- You changed a map, but it didn't take effect After editing sasl_passwd/transport/virtual, always run postmap file (rebuild the .db) and reload.
- Connection refused on port 25 It's only listening on localhost (inet_interfaces = loopback-only), or the port is blocked (firewall).
- Connection refused {#connection-refused} connection to server at "127.0.0.1", port 5432 failed:
- no pg_hba.conf entry {#no-pg-hba-entry} FATAL:
- password authentication failed {#password-failed} A rule matched, the password did not.
- Peer authentication failed {#peer-failed} psql -U appuser without -h goes through the socket, where the rule is peer:
- A pg_hba.conf change has no effect {#hba-not-reloaded} The file was not re-read, or was re-read with an error — then the old rules apply, and pg_reload_conf() still returns t.
- pg_restore: relation "…" already exists {#restore-errors} A restore into a database that already has the objects:
- input file appears to be a text format dump {#text-format-dump} pg_restore got plain SQL — restore it with psql -f.
- A target is DOWN Open /targets — the reason is right there (connection refused / timeout / 404).
- No data for a metric Check the metric name and labels in the UI (autocomplete).
- Prometheus is eating disk space That's retention and the number of series.
- Alerts aren't arriving Check the rules (promtool check rules), the connection to Alertmanager, and its routes.
- Could not connect to Redis (6379) The service isn't running (systemctl status redis-server) or it only listens on 127.0.0.1 while the client connects over the network.
- OOM / memory usage grew redis-cli info memory, --bigkeys.
- Data disappeared after a restart By default data lives only in memory.
- Slow / high latency redis-cli --latency, slowlog get.
- NOAUTH Authentication required requirepass is set — connect with redis-cli -a SECRET or send AUTH as the first command.
- NT_STATUS_LOGON_FAILURE Wrong SMB password/user.
- NT_STATUS_ACCESS_DENIED System permissions on the directory (path) or valid users/read only in smb.conf.
- Server/share not visible The SMB port 445/tcp is closed (firewall) or the service isn't running.
- Mount: "host is down" / protocol negotiation failed An SMB version mismatch.
- Cyrillic/permissions in file names unix charset = UTF-8; permissions for new files — create mask/directory mask, force user/force group for a single owner.
- The service "crashed", but systemctl status shows active You may be looking at a different service or a renamed/aliased unit (a .socket instead of a .service).
- enable didn't start the service right away enable only sets up autostart for the future (it creates a symlink).
- The service keeps restarting on its own (a restart loop) It's crashing after starting, and systemd is configured to restart it (Restart= in the unit file).
- Warning: some journal files were not opened due to insufficient permissions. Journal lines in systemctl status are visible only with sudo or to members of the adm and systemd-journal groups.
- What's the difference between "service", "daemon", and "unit"? A daemon is a background process in the general sense (the term predates systemd).
-
is-activelies after starting the binary manually systemctl only sees what it started itself. - Changes to the unit aren't applied After editing a .service file, you need sudo systemctl daemon-reload, then restart.
- The service is stuck "activating" Check Type= in the unit and journalctl -xeu <unit>:
- The service "doesn't start and doesn't say why" sudo systemctl status -l --no-pager <unit> plus sudo journalctl -u <unit> -b (for the current boot).
- Warning: some journal files were not opened due to insufficient permissions. systemctl status showed the service state but no journal lines.
- The output opened in a pager, no prompt Long output of status, cat, list-units doesn't fit the terminal window, so systemctl shows it through less:
- enable doesn't work — "no installed section" The unit has no [Install] section.
- The service doesn't start systemctl status <unit> — exit code and the last journal lines.
- "Unit not found" Check the name and path:
- Slow boot systemd-analyze critical-chain — who held the boot; the order of the investigation is in systemd-analyze.
- Works by hand, fails from the timer {#works-by-hand} It is almost always the service environment (see "The service environment" above).
- Job for clean.service failed {#job-failed} The script returned non-zero.
- The timer exists, but the job never runs {#not-firing} systemctl list-timers --all:
- Refusing to start, unit … to trigger not loaded {#no-service} The timer has nothing to point at:
- Failed to parse calendar specification {#bad-calendar} OnCalendar= has an error, and the timer will not start.
- Warning: The unit file … changed on disk {#daemon-reload} The unit file was edited, but systemd still runs the old version — and the old schedule.
- The unit files have no installation config {#no-install} enable was called on the service.
- The timer fired once and then went quiet {#remain-after-exit} The service has RemainAfterExit=yes.
- The time has "drifted", logs/certificates look wrong timedatectl → System clock synchronized:
- Failed to set time: Automatic time synchronization is enabled {#set-time} Turn off auto-sync first:
-
Different times in logs and
dateLogs are often in UTC, while date is in the local zone. - The clock "jumps" after a reboot The RTC is in the wrong mode (set-local-rtc).
- Wrong zone inside a container The host's time zone is not the container's; it's set via the TZ variable or by mounting /etc/localtime.
Network
- nf_conntrack: table full, dropping packet The table is full (a busy gateway/NAT) — new connections get dropped.
- NAT/port forwarding works "on and off" conntrack -L shows whether there's a connection entry and its state.
- A connection "stuck" after changing firewall rules Existing connections are already in the table (ESTABLISHED) and bypass the new rules.
-
High
insert_failedinconntrack -SRaces/overflow under a large number of concurrent connections; check the limit and timeouts (/proc/sys/net/netfilter/nf_conntrack_tcp_timeout_*). - Where to see current connections without conntrack Local application sockets — ss; the kernel's tracking itself (for NAT/firewall) — conntrack -L.
- curl: (7) Failed to connect … Couldn't connect to server Nothing listens on the address and port, or a firewall drops the connection.
- curl: (6) Could not resolve host The name was not found:
- curl: (60) SSL certificate problem The certificate failed one of three checks:
- curl: (35) … wrong version number https:// went to a port where the server speaks plain HTTP.
- Exit code 0, yet the site returns an error Without -f a 404 or 502 is a normal response for curl.
- curl: (52) Empty reply from server The connection opened, but the server closed it without a response:
- IPs ping, but names don't DNS isn't working.
- A name resolves to the wrong IP An entry in /etc/hosts overrides DNS — check it (getent hosts name).
- resolv.conf gets overwritten after a reboot Don't edit /etc/resolv.conf directly (it's a symlink to resolved).
- Internal names don't resolve, external ones do There's no search domain or the right DNS for the internal zone.
-
digworks, but the application "can't find" the host dig goes to DNS bypassing NSS. - "The network is slow" at the physical layer sudo ethtool eth0 → Speed and Duplex.
- Growing errors/drops ethtool -S eth0 → rx_errors, rx_dropped, rx_crc_errors.
- I don't know which port this is physically sudo ethtool -p eth0 10 blinks the port's LED for 10 seconds.
- Speed "jumps around" / half-duplex An auto-negotiation problem with the switch.
- Odd latency/timeouts under load Sometimes offload (GRO/TSO) is the culprit with a specific driver.
- 400 Bad Request The request breaks HTTP rules.
- 403 Forbidden The server understood the request and refused.
- 404 Not Found There is no file at the path the server built.
- 405 Not Allowed The method does not fit the resource:
- 413 Request Entity Too Large The request body is larger than allowed.
- 502 Bad Gateway, 504 Gateway Timeout A proxy response:
- 301 when you expect 200 The server sends you to the address in the Location header.
- curl: (35) … wrong version number The reverse of 400 … sent to HTTPS port:
- curl: (7) Failed to connect … Couldn't connect to server There is no HTTP response:
-
No address (
ip -br aempty/down) The interface is down (sudo ip link set <if> up), or DHCP/netplan didn't run (sudo netplan apply, journalctl -u systemd-networkd). -
NO-CARRIERinip -br lNo physical link: - There's an address, but "Network is unreachable" No default route:
- Two interfaces, traffic goes "the wrong way" ip route get <IP> shows the actual choice.
- IP pings, names don't That's DNS, not ip:
- "Is this port reachable from here?" nc -zvw3 host port.
- The port is open locally, but not from outside On the server, nc -zv 127.0.0.1 8080 checks whether it's listening.
- You need a quick L4 connectivity check between hosts nc -l 8080 on one side, nc -zv host 8080 on the other — does TCP/UDP get through on that exact port (useful when debugging a firewall).
- nc "hangs" Without -w, a connection can wait forever.
- ping by IP works, ping by name doesn't The network is fine, DNS isn't working.
- Not even the gateway pings A local problem:
- Ping works, but the service is unreachable ICMP gets through, but the port doesn't.
- Loss/high latency in the middle of the path mtr -rwc 20 shows which hop the loss grows at.
- ICMP is blocked — ping isn't meaningful Many hosts don't answer ping on purpose.
- "It works some of the time" Intermittent loss:
- Host seems down {#host-down} The host did not answer the discovery probes:
- The port is closed, but the service is running {#closed-but-running} The service listens on another address.
- The port is filtered, but there is no rule {#filtered} The packets are dropped by the chain policy (policy drop) or by a rule in another table — sudo nft list ruleset shows every table, including fail2ban's and…
- You requested a scan type which requires root privileges {#needs-root} A SYN scan, UDP (-sU) and OS detection send raw packets.
- The route is gone after a reboot {#route-lost} It was added with ip route add, and it is not in the files under /etc/netplan/.
- Network access disappeared after apply There's an error in the config:
- netplan apply: nothing changed Check the syntax (sudo netplan generate will show the error and the file), whether you edited the right file, and whether the interface name (ip -br a) matches…
- No DNS after configuring it Add a nameservers:
- netplan get shows something different from what's on the system netplan get only reads the files in /etc/netplan/, not the actual state of the interfaces.
- ping: connect: Network is unreachable There's no route to the address:
- Temporary failure in name resolution The name didn't turn into an address:
- 100% packet loss, though the host surely works A firewall drops ICMP — on the host or on the way.
- ping doesn't stop There's no -c:
- 10–30 % loss, replies all over the place The path is overloaded or unstable.
- "Address already in use" when starting a service The port is already taken.
- The service is running but unreachable from outside Is it listening at all:
- The number of CLOSE-WAIT sockets keeps growing The app isn't closing connections (a descriptor leak) — sooner or later you'll hit ulimit.
- Lots of TIME-WAIT Normal with many short-lived client connections; usually not a problem.
- Not sure which process holds a connection ss -tnp shows users:(("nginx",pid=1234,...)).
- Permission denied (publickey) Is the public key present in ~/.ssh/authorized_keys on the server?
- It asks for the key's passphrase every time The key isn't in the agent:
- The server doesn't accept keys at all On the server, in sshd_config:
- Several keys — the wrong one is offered / "Too many authentication failures" The agent tries every key and hits the server's limit.
- Lost the private key It cannot be recovered — generate a new one and update authorized_keys on the servers.
- Permission denied (publickey) The key isn't on the server or permissions on the client/server are wrong.
- Host key verification failed The host's key changed (a reinstall/IP change).
- Connection timed out vs refused timed out — never arrived (firewall/route/wrong network); refused — arrived, but the port is closed (sshd isn't running / a different port).
- The session drops after a timeout ServerAliveInterval 60 in the client config.
- ssh still asks about a new host key A hashed name (-H) in known_hosts won't match if you connect using a different name/alias or port — known_hosts entries are tied to a specific host:port pair.
- ssh warns "REMOTE HOST IDENTIFICATION HAS CHANGED" after reinstalling a server Expected:
- Empty output / timeout The host isn't reachable on the SSH port (down, firewalled, wrong port — check -p), or DNS doesn't resolve the name.
- "Does the request even reach the server?" On the server, sudo tcpdump -ni any port 80, then make a request from the client.
- SYN is visible, but no SYN-ACK Packets arrive but the server doesn't reply:
- SYN-ACK is visible, but the connection doesn't come up An asymmetric route or a firewall on the return path/client side.
- Too much output Narrow it with a filter (host/port), limit with -c N, exclude your own session (not port 22), write to .pcap and analyze in Wireshark.
- No permissions / no interface tcpdump requires root (raw socket access).
- Cannot find device "lab0" The command runs in the wrong namespace.
- Cannot open network namespace: No such file or directory There's no namespace with that name.
- RTNETLINK answers: File exists An interface or address with that name already exists.
- The interface is UP, but ping fails Check the other end:
- Operation not permitted Only root can change namespaces or look inside them.
- There's a bond, but traffic goes over one NIC only That's normal for active-backup (the second is a spare).
- The VLAN doesn't work The id tag must match the switch port's configuration (a trunk with this VLAN).
- The network went down after netplan apply A typo or wrong link.
- A link keeps "flapping" in the bond cat /proc/net/bonding/bond0 shows which slave is dropping; check the cable/port (ethtool).
- Changed the bond mode, and the network went down completely The switch port is still set for the old mode.
- ERROR: cannot verify ... certificate A TLS certificate/chain problem.
- The download broke off wget -c URL resumes from where it stopped, if the server supports Range.
- Got HTML instead of the file The link points to a page/redirect/login, not the file.
- It downloads endlessly / mirrors too much Recursion -r without -np/-l has no brakes.
- Slow / saturating the link --limit-rate= to avoid saturating the link; -q to keep a script's log clean.
- Empty/sparse answer for a domain The data is hidden by privacy protection (GDPR/WHOIS privacy).
- The answer is "truncated" or redirects to another server The top-level whois server points to the registrar/registry.
- Want to trace an attack and block the network whois 1.2.3.4 → abuse/OrgAbuseEmail (a complaint), NetRange/CIDR (the whole block, for blocking in firewall).
- whois is slow/times out The registry rate-limits queries.
Storage and file systems
- blkid prints nothing The device holds neither a filesystem nor a partition table — a new disk.
- The output has only PARTLABEL and PARTUUID The partition is in the table, but there is no filesystem on it:
- The UUID in fstab is not found After a new mkfs the filesystem has a new UUID.
- Two partitions have the same UUID The partition was copied whole (dd, a cloned disk).
- fstab has PARTUUID instead of UUID Both work, but they are different values:
- setquota doesn't work / "not found" The filesystem is mounted without usrquota/grpquota — check mount | grep -i quota.
- A user hit their limit quota -u user / repquota show the current usage and the ceiling.
- Quotas "reset" after a reboot quotaon doesn't run itself — make sure the options are in /etc/fstab and the quotaon unit is enabled (on ext filesystems).
- quotacheck wants to unmount the filesystem It's best run on an idle/read-only filesystem.
- df says "full", but du can't find that much A file was deleted but is still open by a process — the space isn't freed until it closes:
-
No space left on device, even though
df -hshows free space You're out of inodes: - Logs filled up the disk du -sh /var/log/*; set up rotation (logrotate) and the journal (journalctl --vacuum-time=, see journalctl).
- Deleted files, but the space didn't come back Either a deleted-but-open file (see lsof +L1 above), or it's a different partition — check df -h path.
- Error: /dev/vdb: unrecognised disk label The disk has no partition table yet — the normal state of a new disk:
- mount: wrong fs type, bad option, bad superblock You are mounting a disk or partition that has no filesystem.
- The partition was created but there is no /dev/vdb1 The kernel has not re-read the table:
- The kernel still uses the old table fdisk wrote the table, but the kernel keeps the old one because a partition of this disk is mounted.
- Warning: The resulting partition is not properly aligned The start is given in sectors or bytes that do not match the disk's blocks.
- An ext4 error, the filesystem went read-only {#ext4-errors} ext4 found damage and wrote EXT4-fs error to the kernel log (see dmesg).
- Can't shrink xfs xfs cannot be shrunk at all.
- "Structure needs cleaning" (xfs) Corruption:
- "Not enough space" on a big disk that has free space 5% is reserved for root by default.
- Two partitions with the same UUID after cloning Change one of them:
- failed to set up loop device: Permission denied losetup:
- There is no /dev/loop0p1 The device was attached without -P, so the kernel did not read the table.
- losetup: cannot find an unused loop device No free devices are left, usually because of forgotten attachments.
- The file is deleted but the space did not come back The file is still attached to a loop device.
- losetup -d did not detach the device The device is mounted.
- Plugged in a disk, but lsblk doesn't show it lsblk doesn't rescan the bus — the kernel has to see the device first.
- The device is in lsblk, but not mounted lsblk -f with an empty MOUNTPOINT column — the partition exists but isn't mounted and/or isn't in /etc/fstab.
- Device names shift between reboots /dev/sdX can change when disks are reordered.
- Extended the LV, but there's no extra space The LV isn't the filesystem.
- vgs shows little free space (VFree=0) The group is full — add a PV:
- A snapshot "overflowed" and became invalid A snapshot stores changes; if the original volume is written to heavily and the snapshot is too small, it overflows (lvs shows 100%).
- The volume is missing after a reboot sudo vgchange -ay (activate it), and check auto-activation and /etc/fstab (mount by /dev/<vg>/<lv> or UUID).
- Accidentally ran lvremove on the wrong volume Data is gone.
- contains a ext4 file system … Proceed anyway? (y,N) The partition already has a filesystem, and mkfs.ext4 asks again.
- /dev/vdb1 is mounted; will not make a filesystem here! The partition is mounted and in use.
- appears to contain an existing filesystem (mkfs.xfs) mkfs.xfs found another filesystem and refused.
- The file /dev/vdb1 does not exist and no size was specified There is no such partition:
- After mkfs the partition does not mount from fstab mkfs produced a new UUID, and fstab still has the old one.
- mkfs on the whole disk instead of a partition mkfs.ext4 /dev/vdb (no digit) puts the filesystem on the whole disk, over the partition table.
- wrong fs type, bad option, bad superblock {#wrong-fs-type} mount answers wrong fs type, bad option, bad superblock on /dev/vdb, missing codepage or helper program, or other error and suggests looking at dmesg.
- your fstab has been modified, but systemd still uses the old version {#daemon-reload} mount prints this hint after fstab is edited:
- "target is busy" on umount Something is using the filesystem.
- An error in fstab → the system didn't boot A bad line can drop the boot into emergency mode.
- You mounted it, but the space isn't where you expected If the mount point already had files in it, they're "hidden" under the mounted filesystem (not deleted).
- A network filesystem hangs the boot Without _netdev, the system waits for the filesystem before networking is up.
- The wrong filesystem/device /dev/sdX names can shift between reboots — mount by UUID (blkid), not by /dev/sdX.
- mount.nfs: access denied by server The client's IP doesn't match the mask in /etc/exports, or exportfs -ra wasn't run after editing it.
- Ownership/permissions on the mount look "wrong" NFS maps by UID/GID — the client and server need matching ones (or set up idmapping for NFSv4).
- Connection timed out / mount hangs The firewall or the service.
- Processes hang when the server is unreachable (D state) A "hard" mount (the default) hangs processes indefinitely.
- Stale file handle The export was recreated, or the filesystem was remounted on the server.
- The image is larger than it should be qcow2 doesn't shrink itself after data is deleted inside it.
- Backing file has changed / the overlay is broken An overlay is tightly bound to its backing image.
- You resized the disk, but the VM has no extra space qemu-img resize only changes the container.
- Don't touch a mounted/in-use image Never run qemu-img against a running VM's disk — you'll corrupt it.
- The image is "corrupted" after a crash qemu-img check disk.qcow2 (and -r all to attempt a repair).
- xfs_growfs: "specified file is not on device" You passed the device name (/dev/labvg/data) instead of the mountpoint.
- df -h doesn't show the new size after lvextend The volume grew, but the filesystem didn't yet:
- resize2fs: "New size smaller than minimum" The target size is smaller than the data already on the filesystem.
- The resize hangs or complains about space Free space is needed at the volume group level, not just the logical volume:
- The array is degraded ([_U]) A disk dropped out.
- It doesn't assemble after a reboot The config wasn't saved.
- The rebuild takes forever / is slow Normal for large disks (hours).
- RAID is not a backup! RAID protects against a disk failure, but not against deletion, ransomware, or a mistake.
- A disk from an old array won't let you recreate on it Leftover metadata:
Logs and audit
- The journal is empty after a reboot journald isn't persistent.
- The journal is filling up the disk journalctl --disk-usage, then --vacuum-time=7d or --vacuum-size=500M.
- You need logs for a specific failure journalctl -xeu <unit> --since "5 min ago" is the most common diagnostic query (see systemctl).
- The time in the journal looks "wrong" journald stores entries in UTC internally and shows the local timezone.
- A service's logs show up in /var/log too (duplicates) journald and rsyslog can both log the same thing.
- The log keeps growing, no rotation happens Is there a config in /etc/logrotate.d/?
- After rotation the service keeps writing to the old (deleted) file There's no postrotate with a reload, and no copytruncate.
- "error: skipping … because parent directory has insecure permissions" logrotate is complaining about permissions/ownership of the log directory.
- The disk is already full of logs Urgent fix:
- The log isn't being written Is the service active (systemctl status rsyslog)?
- Logs grow and fill the disk Rotation is logrotate's job (rsyslog never cleans up on its own).
- Logs aren't arriving at the central server Is the input module enabled on the receiver (imtcp/imudp, port 514) and the port open (firewall, nc -zv host 514)?
- Duplicate lines / "logged twice" journald forwards to rsyslog (imjournal) and the same facility gets written to several files.
- journald vs rsyslog — where to look Structured search by service — journalctl (-u, _COMM=); familiar text files and forwarding — /var/log/* (rsyslog).
Boot
- You are in emergency mode {#emergency-mode} The boot was stopped by a dependency of local-fs.target:
- The service works, but is not running after a reboot {#not-enabled} It was not enabled:
- The service starts before the network and fails {#before-network} The unit has no After=network-online.target, or only After=network.target.
- Dependency failed for … {#dependency-failed} A unit with Requires= (or BindsTo=) did not start because its dependency failed to start.
- is-system-running: degraded {#degraded} The boot finished, but some unit failed.
- user-data was not applied The first line must be exactly #cloud-config (no leading spaces/BOM), and valid YAML (cloud-init schema --system).
- Packages didn't install / runcmd didn't run /var/log/cloud-init-output.log has the command output and errors (no network for apt?
- Can't SSH in after provisioning The key never reached the right user, or the network (netplan) never came up.
- Hostname/network "revert" to default cloud-init resets them on every boot unless you disable that:
- Disable cloud-init entirely sudo touch /etc/cloud/cloud-init.disabled (or remove the package).
- read kernel buffer failed: Operation not permitted {#not-permitted} kernel.dmesg_restrict = 1:
- journalctl -k prints -- No entries -- {#no-entries} Without sudo, a user outside the adm and systemd-journal groups sees only their own entries.
- The buffer does not start at boot, or is empty {#buffer-wrapped} The buffer overflowed and old lines were pushed out, or someone cleared it (dmesg -C).
- No journal boot entry found {#no-previous-boot} The journal has no previous boot:
- Time in dmesg -T and the journal differ {#time-mismatch} -T counts time from boot and ignores suspends.
- A device/driver isn't working dmesg | grep -i <device> for initialization errors.
- The OOM-killer killed a process dmesg -T | grep -i oom or journalctl -k | grep -i oom — the kernel killed a process under memory pressure (see oom-killer).
- A module doesn't load at boot Add it to /etc/modules-load.d/*.conf; check modinfo and dependencies (depmod -a).
- modprobe -r: "Module is in use" Something is using the module (lsmod's "Used by" column).
- The disk is throwing I/O errors dmesg showing "I/O error, dev sdX" is a sign of a failing disk; check SMART (smartctl -a) and make a backup (see filesystems).
- Changed it, reset after a reboot {#reset-after-reboot} sysctl -w and writes to /proc/sys last until reboot.
- permission denied on key, yet the value is printed {#no-sudo} Without sudo, sysctl prints the line with the new value and exits with 0, but does not change the value.
- A file in sysctl.d is not applied {#file-ignored} The name does not end in .conf — the file is skipped silently.
- cannot stat /proc/sys/…: No such file or directory {#cannot-stat} The answer is sysctl:
- invalid syntax, continuing {#invalid-syntax} On the command line name=value has no spaces.
- Forwarding is on, but packets do not pass {#forwarding} Besides net.ipv4.ip_forward = 1 you need routes (ip) and allowing firewall rules, plus a masquerade rule for NAT.
- The system doesn't finish booting In GRUB, pick a previous kernel (Advanced) — it boots → the new kernel is the problem.
- It hangs on boot because of fstab An error in /etc/fstab drops you into emergency mode.
- Slow boot systemd-analyze blame plus critical-chain show which units are slow (often a hung network wait or mount with a timeout, NetworkManager-wait-online).
- Forgot the root password GRUB → e → add init=/bin/bash to the kernel line → boot → mount -o remount,rw / → passwd → exec /sbin/init or reboot.
- initramfs prompt after a kernel update The root/a module wasn't found.
- Bootup is not yet finished {#not-finished} The boot is still going:
- Removed the first line of blame, and the boot is just as slow {#blame-misleads} blame shows how long each unit took to start, not who waited for whom.
- verify is silent, and the service does not start {#verify-silent} A misspelled key or a wrong value gives code 0 — read the output.
- Unit … not found {#unit-not-found} Requires= or Wants= names a unit that does not exist:
- Transaction order is cyclic {#ordering-cycle} The units wait for each other through After=.
- uname -r still shows the old version after apt upgrade Upgrading the kernel installs new files, but the running kernel is still the old one until a reboot happens.
- What's the difference between the kernel and the distribution? The kernel is one process and a set of drivers; a distribution is the kernel plus system utilities, a package manager, and configuration (see uname for the…
- A driver I need doesn't load That's almost always about a kernel module, not the kernel as a whole — see kernel-modules:
- I want to change kernel behavior without rebooting Some parameters change on the fly through sysctl (see sysctl), but not all of them:
Packages
- "Could not get lock /var/lib/dpkg/lock" apt/unattended-upgrades is already running.
- dpkg was interrupted, "broken packages"
- apt update: NO_PUBKEY / 404 / repository changed A broken or stale source in sources.list.d/.
- A specific version / rollback apt-cache policy PKG shows what's available; apt install pkg=version installs it; apt-mark hold pins it.
- Free up space used by the cache sudo apt clean (the whole cache) / autoclean (only stale files); autoremove --purge (see disk-usage).
- The package installs slowly / is huge Snap bundles its dependencies (heavier than apt) — this is normal.
- Snap can't see files outside $HOME The sandbox (confinement) restricts access.
- It updated and broke sudo snap revert package rolls back to the previous version (snap keeps it).
- Is this apt or snap? which cmd, snap list | grep cmd, dpkg -S $(which cmd) (see which, apt).
- Old revisions take up space snap keeps past revisions.
Security
- "Permission denied" even though the permissions (rwx) look right AppArmor is blocking it.
- The service works, but cannot access a new directory The profile does not allow that path.
- The profile is not reread after an edit sudo apparmor_parser -r <profile> (or reload apparmor).
- I want to temporarily disable it for one service sudo aa-complain <profile> (soft) or aa-disable.
- A snap app and AppArmor Snap uses its own profiles (confinement); denials are also visible in journalctl -k (see snap snap connections).
- Who changed an important file? Set a watch (auditctl -w file -p wa -k label), then ausearch -k label -i → uid/command/time.
- Too many events / noise / losses (lost) auditctl -s shows lost/backlog.
- Rules disappeared after a reboot auditctl -w/-a rules are temporary.
- I can't change or delete rules Immutable mode is on (-e 2) — rules are locked until reboot (by design, to protect against tampering).
- auditd vs journald journald handles operational service logs (journalctl); auditd handles who-did-what for security (an immutable trail).
- AppArmor denials are gone from journalctl -k {#apparmor-denials} While auditd runs, kernel audit messages, apparmor="DENIED" included, go to it and are written to /var/log/audit/audit.log (type=AVC), and journalctl -k gets…
- Permission denied on a port below 1024 {#bind-denied} PermissionError:
- unable to set CAP_SETFCAP effective capability {#setfcap} setcap ran without sudo:
- fatal error: Invalid argument {#invalid-argument} setcap did not understand the part name or the file.
- The part is gone after a copy or an upgrade {#lost} getcap prints nothing and the program gets Permission denied again.
- Root gets Operation not permitted {#root-denied} The process runs as UID 0 and the kernel refuses.
- I banned myself From the console (hypervisor/serial) or from an allowed IP:
- The jail isn't banning anyone Is enabled = true?
- The address is not banned: Ignore by ip {#ignoreip} The address is in ignoreip:
- It's banning, but the attack continues from other IPs That's a distributed brute force.
- Not sure whether it's working at all fail2ban-client status sshd → Total/Currently failed and banned.
- I locked myself out of SSH Get in through the hypervisor console/serial; ufw disable, or fix the rule set and reload it.
- A rule isn't taking effect Order matters:
- The port isn't reachable from outside, even though the service is listening sudo ufw status / nft list ruleset — is the port allowed; don't forget an external NAT/router.
- The port is open from the machine itself, though it was closed {#check-from-outside} curl http://192.0.2.1:8080/ on the machine itself answers 200 although the drop policy closes the port.
- gpg: decryption failed: No secret key There's no private key for this recipient (it was encrypted for a different key), or the key isn't imported.
- Can't check signature: No public key The author's public key is missing.
- Forgot the private key's passphrase It cannot be recovered.
- Inappropriate ioctl for device (in scripts/CI) GPG can't prompt for a passphrase (no TTY).
- WARNING: ... not certified with a trusted signature The key is imported but not trusted.
- Password 123 is accepted {#weak-password-accepted} grep pwquality /etc/pam.d/common-password prints nothing — the module is not in the stack:
- BAD PASSWORD on a password change {#bad-password} The reason is the text after the colon:
- The account is locked due to N failed logins {#account-locked} pam_faillock counted deny failures within fail_interval.
- Many failures, no lockout {#no-lockout} The pam_faillock lines are missing from common-auth or sit in the wrong place:
- pam-auth-update: Local modifications {#local-modifications} The common-* files were edited by hand, and pam-auth-update refuses to rebuild them — the profile does not get enabled.
- The service fails after ProtectSystem=strict {#read-only} The log shows Read-only file system or Permission denied on a write.
- status=217/USER {#217-user} The user from User= does not exist on the machine.
- Permission denied on a port below 1024 {#low-port} After User= the service lost the right to port 80 or 443.
- The rating dropped, the process did not change {#score-not-applied} systemd-analyze security shows 1.5 OK, while ps shows the service as root.
- sudo: The "no new privileges" flag is set {#nnp-sudo} The service's script calls sudo or another setuid program, and the unit has NoNewPrivileges=yes.
- Permission denied (publickey) Permissions on the server:
- Connection refused The server isn't listening on the port:
- Connection timed out A network/firewall-level issue (never reached sshd):
- Changed the port — can't connect SELinux/the port isn't allowed, the firewall is still on the old port, or the client is connecting to 22.
- Locked yourself out with a config change Get in through the hypervisor console/serial and roll back sshd_config (or sshd -t would have shown the error before reload — always check).
- user is not in the sudoers file The user isn't in the sudo group.
- sudo: a terminal is required to read the password No TTY (over SSH without -t, or from a script).
- NOPASSWD doesn't work for switching users (root) NOPASSWD:
- The command works by hand but not through sudo (PATH/env) env_reset/secure_path clean the environment.
- Broke sudoers, lost access visudo won't let you save a file with an error.
- Locked yourself out of SSH The rule for 22/tcp must come before the DROP policy.
- Rules disappeared after a reboot iptables isn't persistent.
- Order matters Rules apply top to bottom, stopping at the first match.
- Counters don't grow — the rule isn't firing -L -v shows per-rule packet counters.
- Not sure whether it's really iptables or nftables On Ubuntu, iptables is often iptables-nft (the nftables backend).
- certificate has expired {#expired} curl:
- unable to get local issuer certificate {#incomplete-chain} The client did not reach a trusted root.
- no alternative certificate subject name matches {#name-mismatch} curl:
- self-signed certificate curl:
- wrong version number curl:
- The server sends the old certificate The file is replaced but s_client shows the old notAfter:
- Updates are not installed {#not-running} 20auto-upgrades has "0" or does not exist.
- apt waits for a lock: (unattended-upgr) {#lock} apt says Could not get lock /var/lib/dpkg/lock-frontend.
- The update is installed, the vulnerability is still there {#still-vulnerable} The service runs an old copy of a file:
- A service restarted by itself at night {#unexpected-restart} needrestart restarted it after a scheduled update.
- visudo: unable to open /etc/sudoers: Permission denied visudo was run without root.
- syntax error and the What now? prompt The saved file failed the check:
- bad permissions, should be mode 0440 The file in /etc/sudoers.d was created with ordinary permissions.
- The rule exists, but sudo doesn't see it The file name contains a dot (deploy.conf) or ends with ~ — sudo silently skips such files, and visudo -c doesn't list them.
- The rule exists, but a password is still asked Of all matching rules, the last one wins.
- The tunnel is up, but there's no connectivity sudo wg show — is there a "latest handshake"?
- There's a handshake, but pings don't go through AllowedIPs doesn't include the needed addresses (for each peer, it's "which IPs are behind it").
- Can't connect after a reboot systemctl enable wg-quick@wg0.
- Asymmetric / one side sees the other, but not vice versa AllowedIPs must be configured consistently on both sides.
Automation
- Could not match supplied host pattern {#no-hosts} The inventory was not read:
- leaves us with no hosts to target {#limit-no-hosts} -l names a machine or group that is not in the inventory.
- UNREACHABLE! {#unreachable} Ansible could not connect over SSH:
- couldn't resolve module/action {#unknown-module} A typo in the module name, or the collection is missing.
- The requested handler … was not found {#handler-not-found} notify names a handler that does not exist:
- AnsibleUndefinedVariable {#undefined-variable} A template or task uses a variable that does not exist:
- Syntax Error while loading YAML {#yaml-syntax} The indentation does not match:
- Permission denied without become {#become} The task changes something owned by root, and the play runs as a user.
- Every run is changed again {#always-changed} shell or command without creates:/changed_when:, or a template with a variable that changes every time (a date, a random number).
- UNREACHABLE! {#unreachable} Ansible could not connect over SSH; the module never ran, the exit code is 4.
- Destination /etc not writable {#not-writable} The module runs without root rights:
- sudo: a password is required You need --become and working sudo.
- A task is "changed" every time You're using command/shell instead of an idempotent module.
- Vault: can't decrypt anything You need the vault password (--ask-vault-pass or --vault-password-file).
Containers
- Unable to find image … locally {#not-found} No image with that name and tag is on the machine, so Docker went to the registry for it.
- conflict: unable to delete … must be forced {#in-use} A container needs the image, even a stopped one.
- Rebuilt the image, but the container runs the old one {#old-image} A container is created from the image that held the name at docker run time.
-
<none>instead of a name {#dangling} Dangling images remain after rebuilding under the same tag. - Permission denied on an archive from docker save {#save-permission} sudo docker save -o file.tar creates the file as root with mode 600, and student cannot read it.
- no configuration file provided: not found {#no-file} The current directory has no compose.yaml.
- additional properties '…' not allowed {#unknown-key} A misspelled key or a key at the wrong indent level.
- yaml: line 3: found character that cannot start any token {#yaml-tab} Line 3 has a tab or another character YAML cannot start a value with.
- service "backend" refers to undefined volume {#undefined-volume} The service mounts a named volume missing from the top-level volumes:.
- external volume "…" not found {#external-volume} A volume with external:
- dependency failed to start: container … is unhealthy {#unhealthy} backend failed its healthcheck, and proxy with condition:
- The "X" variable is not set {#variable-not-set} The "MODE" variable is not set.
-
the attribute
versionis obsolete {#version-obsolete} A version: - A service in a restart loop {#restart-loop} docker compose ps shows Restarting:
- Pulling … failed to resolve reference {#pull-failed} The service image is not on the machine, so compose went to the registry for it.
- service "proxy" is not running {#not-running} exec works only in a running service.
- permission denied … docker.sock {#permission-denied} The user is not in the docker group.
- Cannot connect to the Docker daemon {#daemon-down} The service is not running:
- port is already allocated {#port-allocated} Bind for 0.0.0.0:8081 failed:
- The container name … is already in use {#name-in-use} A container with that name exists, maybe a stopped one (docker ps -a).
- The container exits at once with code 0 {#exited-zero} The main process finished without an error.
- docker stop takes 10 seconds and gives 137 {#stop-137} docker stop sends SIGTERM and waits 10 seconds.
- container … is not running {#not-running} docker exec works only in a running container.
- docker logs | grep finds nothing {#logs-stderr} docker logs returns the container output on two streams:
- Data gone after re-creating {#data-lost} The data was in the container layer.
- Containers cannot see each other by name {#no-dns} Both are on the default bridge network:
- volume is in use / has active endpoints {#in-use} A container needs the volume or network, maybe a stopped one.
- DEPRECATED: The legacy builder is deprecated {#legacy-builder} The old builder runs the build:
- failed to resolve reference at the FROM step {#from-not-found} The FROM image is not on the machine, so Docker went to the registry.
- COPY with a path above the context {#outside-context} The COPY path goes above the context:
- failed to compute cache key: not found {#file-not-found} The old builder says COPY failed:
- failed to read dockerfile {#no-dockerfile} failed to read dockerfile:
- executable file not found in $PATH {#exec-not-found} The image built and the container was created but did not start (status Created):
- A container from the new image exits at once with 0 {#exits-at-once} The start command finished or went to the background.
- The change did not reach the container {#change-not-applied} Check three things in order.
Nothing found. Try a shorter query.