Ubuntu 24.04 46
- Check a systemd timer OnCalendar value before installing it
Run systemd-analyze calendar to see the normalized form and next run time of an OnCalendar value before it goes into a unit, and tell parse errors from never.
Ubuntu 24.04.5 · systemd 255.4-1ubuntu8.18 (time zone Asia/Seoul) - Check sshd_config with sshd -t before you reload
Catch sshd_config typos with sshd -t before you reload. Covers real error messages, exit codes, Match block checks, and -T for the effective values.
Ubuntu 24.04.5 · OpenSSH 9.6p1 (openssh-server 1:9.6p1-3ubuntu13.20) - Find the Boot Bottleneck with systemd-analyze blame
Read systemd-analyze time, blame and critical-chain output, and use critical-chain to tell which slow units on the blame list actually delayed the boot.
Ubuntu 24.04.5 LTS · systemd 255 (255.4-1ubuntu8) - Find the process the OOM killer killed on Ubuntu 24.04
Search journalctl -k and dmesg for OOM killer records when a service vanishes, then read the victim and whether a system shortage or a cgroup limit caused it.
Ubuntu 24.04.5 LTS · systemd 255 · Linux 6.8.0-147 (log line shapes from the kernel 6.8 format strings) - Test the fail2ban sshd filter with fail2ban-regex
Count how many auth log lines the sshd filter catches before you enable a jail, then check the missed lines and how each mode changes the result.
Ubuntu 24.04 · fail2ban 1.0.2 (package unpacked, only fail2ban-regex run) - Replace a failed disk when mdadm RAID1 shows [U_] (degraded)
Read [U_] and (F) in /proc/mdstat, replace the dead disk with fail, remove and add, then watch the resync run. Based on the mdadm man page and kernel.org wiki.
mdadm 4.3 man page · Linux RAID wiki (kernel.org) · 2026-10 - certbot "Timeout during connect" — Check Port 80
When certbot fails with "Timeout during connect (likely firewall problem)", find where port 80 is blocked by testing from inside the server, then from outside.
Ubuntu 24.04.5 · Nginx 1.24.0 · Let's Encrypt official docs · 2026-10 - Test HTTPS on Nginx with a Self-Signed Certificate
Create a self-signed certificate with openssl, attach it to Nginx, and see what curl reports with the self-signed certificate error, -k and --cacert.
Ubuntu 24.04 · nginx 1.24.0 · OpenSSL 3.0.13 · curl 8.5.0 - Verify fstab with findmnt before you reboot
Use findmnt --verify to catch missing UUIDs and mount points in fstab before a reboot. It misses mistyped options and a missing nofail, so check those by hand.
Ubuntu 24.04.5 LTS · util-linux 2.39.3 (findmnt) - Find setuid files and file capabilities: why ping has no setuid
List setuid binaries with find -perm -4000 and file capabilities with getcap -r /. Ubuntu 24.04 vs Rocky 9, and two ways ping works without setuid.
Ubuntu 24.04.5, Rocky Linux 9 (Docker) · 2026-10 - nginx worker_connections are not enough: tuning and keepalive
Fix nginx "worker_connections are not enough": raise worker_connections, fit worker_rlimit_nofile to the hard limit, check upstream keepalive (1.29.7+).
nginx 1.30.6 (Docker nginx:stable) · 2026-10 - Fix "System has not been booted with systemd as init system"
systemctl says "System has not been booted with systemd" when PID 1 is not systemd. Start services directly in containers; on WSL, enable it in wsl.conf.
Ubuntu 24.04 · systemd 255.4 · nginx 1.24.0 (Docker) · WSL official docs · 2026-10 - Fix "setlocale: LC_ALL: cannot change locale" on Ubuntu 24.04
Ubuntu "setlocale: LC_ALL: cannot change locale" means the locale you set was never generated. Check with locale -a, then run locale-gen or switch to C.UTF-8.
Ubuntu 24.04 (Docker) · locales 2.39-0ubuntu8.9 · 2026-10 - Fix "sudo: unable to resolve host" after a hostname change
"sudo: unable to resolve host" after renaming a server means /etc/hosts lacks the new name. Make the 127.0.1.1 line match hostname and confirm with getent.
Ubuntu 24.04 · sudo 1.9.15p5 (Docker) · 2026-10 - Fix resize2fs "Bad magic number in super-block" on XFS
resize2fs "Bad magic number in super-block" means the target is not ext4, usually XFS. Check the type with df -hT, then run xfs_growfs on the mount point.
Ubuntu 24.04 (Docker) · e2fsprogs 1.47.0 · xfsprogs 6.6.0 · 2026-10 - Fix "/bin/bash^M: bad interpreter" (CRLF line endings)
Bash "bad interpreter" (on Ubuntu 24.04: "required file not found") means CRLF line endings. Strip \r with sed, then pin LF in .gitattributes.
Ubuntu 24.04 · bash 5.2.21 · Rocky 9.3 · bash 5.1.8 (Docker) · 2026-10 - "umount: target is busy" — find the process holding the mount
"umount: target is busy" means a process has its working directory or an open file on that mount. Find it with fuser -vm or lsof +f, stop it, avoid umount -l.
Ubuntu 24.04 · util-linux 2.39.3 · lsof 4.95.0 · psmisc 23.7 · 2026-10 - SSH "REMOTE HOST IDENTIFICATION HAS CHANGED": verify, then fix
SSH "REMOTE HOST IDENTIFICATION HAS CHANGED": the host key differs from known_hosts. Verify the fingerprint out of band, then run ssh-keygen -R.
Ubuntu 24.04 (Docker) · OpenSSH 9.6p1 · 2026-10 - systemd-run MemoryHigh vs MemoryMax: throttle or OOM kill?
A 400MB allocation under systemd-run --scope with MemoryHigh or MemoryMax at 256M. With swap both finished; without swap High stalled and Max was OOM-killed.
Ubuntu 24.04 · systemd 255 · kernel 6.8 · cgroup v2 · 2026-10 - Fix apt "E: Unable to locate package" on Ubuntu 24.04
"E: Unable to locate package" means no apt update, universe disabled, a wrong name, or a package missing from 24.04. Tell them apart with apt-cache policy.
Ubuntu 24.04.5 · apt 2.8.3 (Docker) · 2026-10 - Pre-install crisis diagnostic tools on Ubuntu 24.04 and Rocky 9
Install sysstat, bpftrace, bcc and perf before an outage. Package names, versions, disk space and sar collection defaults compared on Ubuntu 24.04 and Rocky 9.
Ubuntu 24.04.5, Rocky Linux 9.8 (Docker) · 2026-10 - Fix SSH "UNPROTECTED PRIVATE KEY FILE" (permissions 0644)
SSH "UNPROTECTED PRIVATE KEY FILE" (0644 too open) means others can read your key, so ssh ignores it. Run chmod 600, or copy the key if you cannot chmod it.
Ubuntu 24.04 (Docker) · OpenSSH 9.6p1 · 2026-10 - Verify installed files against packages: debsums and rpm -V
Check packaged files with debsums or dpkg --verify on Ubuntu and rpm -V on Rocky 9. A changed binary, config file and deleted file show what each reports.
Ubuntu 24.04 · debsums 3.0.2.1 · Rocky Linux 9 · rpm 4.16.1.3 (Docker) · 2026-10 - Nginx 403 Forbidden — Tell Permission Errors from Index Errors
Two error.log messages explain a 403. Find the blocking directory with namei -l for Permission denied; add an index or autoindex when the index is forbidden.
Ubuntu 24.04.5 · Nginx 1.24.0 (worker user www-data) - Squid proxy: allow only your subnet, check 403 TCP_DENIED
Limit Squid to your subnet with acl src and http_access, keep the default protection rules, and check curl -x (200/403) and TCP_DENIED. Wrong order blocks all.
Ubuntu 24.04 · Squid 6.14 (Docker) · curl · 2026-10 - Fix apt "E: dpkg was interrupted" with dpkg --configure -a
Ubuntu apt "dpkg was interrupted" means an install stopped halfway. Check no other apt runs, finish it with sudo dpkg --configure -a, then rerun the install.
Ubuntu 24.04 (Docker) · apt 2.8.3 · dpkg 1.22.6 · 2026-10 - systemd-analyze security from 9.4 to 1.9: what breaks
Harden a systemd unit in 12 steps while scoring it with systemd-analyze security --offline. From 9.4 down to 1.9, see where writes and chown started to fail.
Ubuntu 24.04 · systemd 255 · 2026-10 - Fix apt "Key is stored in legacy trusted.gpg keyring" warning
apt warns "Key is stored in legacy trusted.gpg" when a repo key is in the old shared keyring. Export it to /etc/apt/keyrings, add signed-by, delete the old key.
Ubuntu 24.04 · apt 2.8.3 · gpg 2.4.4 (Docker) · 2026-10 - PHP-FPM pm.max_children Tuning: server reached pm.max_children
Fix server reached pm.max_children: read listen queue on the FPM status page, measure one worker's memory, and size max_children to the RAM PHP can use.
PHP 8.3.36 (php:8.3-fpm Docker) · Ubuntu 24.04 php8.3-fpm 8.3.6 (Docker) · 2026-10 - Tune net.core.somaxconn: Listen Backlog and ss Recv-Q/Send-Q
Before raising net.core.somaxconn, read ss -ltn Recv-Q/Send-Q and nstat ListenOverflows to see if the accept queue overflows. Raise the app backlog too.
Ubuntu 24.04 (kernel 6.8) · Docker 29.9.2 · python:3.12-slim · nginx 1.30.6 · 2026-10 - Check an ext4 image with a damaged superblock using e2fsck
Practice on an image file: read e2fsck -fn output and exit codes, then find a backup superblock and use -b to check and repair when the primary one is damaged.
Ubuntu 24.04.5 LTS · e2fsprogs 1.47.0 · ext4 image file (300M) - How to Set Up Nginx Basic Auth with htpasswd on Ubuntu 24.04
Set up Nginx auth_basic with htpasswd on Ubuntu 24.04, pick a hash (the Nginx docs say not to use {SHA}), and tell 401, 403 and 500 apart by the error log.
Ubuntu 24.04 · nginx 1.24.0 (Docker) · 2026-10 - How to check unattended-upgrades applied updates (Ubuntu 24.04)
After a USN is published, confirm the fix landed using the fixed version, apt-cache policy, a dry run and the logs, including a dry-run message that misleads.
Ubuntu 24.04 (Docker) · unattended-upgrades 2.9.1+nmu4ubuntu1 · 2026-10 - Ubuntu 24.04 SSH port won't change (ssh.socket)
Port is set in sshd_config and ssh is restarted, but port 22 still listens. ssh.socket owns the port. How to check, and the order that keeps you connected.
Ubuntu 24.04.5 · openssh-server 1:9.6p1-3ubuntu13.20 · systemd 255 (read-only checks + official docs) - Allow SSH in ufw before you enable the firewall
Running ufw enable first over SSH can lock you out. Add the SSH rule, check pending rules, enable, read status verbose, and recover from a lockout.
Ubuntu 24.04 · based on the official ufw docs · 2026-10 - Extend an LVM logical volume into the free space of its VG
Read VFree from vgs, then grow the logical volume and its ext4 file system with one lvextend -r -l +100%FREE line. Covers XFS and the case where VFree is 0.
Ubuntu 24.04 · lvm2 2.03.16 · e2fsprogs 1.47.0 · ext4 on loop devices - Fix apt "Could not get lock /var/lib/dpkg/lock-frontend"
Find which process holds the dpkg lock, make apt wait for it, leave the lock file alone, and run dpkg --configure -a only after a run was truly interrupted.
Ubuntu 24.04.5 LTS · apt 2.8.3 · dpkg 1.22.6 - Find Out Why a cron Job Is Not Running — Logs, PATH and %
A job works in the terminal but not from cron. Read the log to see if cron started it, then check PATH, %, permissions, a missing newline and the user field.
Ubuntu 24.04.5 · cron 3.0pl1-184ubuntu2 (man pages and binary checked) · environment reproduced with env -i - Find why SSH says Permission denied (publickey)
Read ssh -v to see which key was offered, then use the sshd log lines (Authentication refused, Failed publickey) to find permission, user or key-line problems.
Ubuntu 24.04 · OpenSSH 9.6p1 (reproduced with a separate sshd) - Find what is using the space when a disk is full
Find the full file system with df, narrow down big files with du and find, then handle space that does not come back after a delete and inode exhaustion.
Ubuntu 24.04.5 LTS · coreutils 9.4 · lsof 4.95.0 · ext4 loop file system - Fix "Could not calculate the upgrade" on Ubuntu 24.04 to 26.04
Fix "Could not calculate the upgrade" (24.04 to 26.04): find the Broken package in /var/log/dist-upgrade/apt.log, the known lintian case and its workaround.
Ubuntu 24.04 → 26.04 · Ubuntu docs and Launchpad reports, 2026-10 - Check how much disk the systemd journal uses and shrink it
Check how much disk the journal uses, delete old files with vacuum, pin a size limit with a drop-in file, and find the units that fill the journal.
Ubuntu 24.04 · systemd 255 · settings per freedesktop.org journald.conf(5) and journalctl(1) - Put Nginx in front of an app as a reverse proxy
Send one host name to an app on a local port, pass the client address along, and tell a proxy 502 apart from an app error.
Ubuntu 24.04.5 LTS · nginx 1.24.0 · Python 3 http.server (test app) - Write a logrotate config and test it before using it
Write a logrotate config for an app log, preview it with -d, force a run with -f and a state file, and check the result. Covers copytruncate versus postrotate.
logrotate 3.21.0 · Ubuntu 24.04 · systemd 255 - Find why a systemd service is failed
Read the Active and status lines of systemctl status, check the log from just before the failure, and fix 203/EXEC and "start request repeated too quickly".
Ubuntu 24.04 · systemd 255 (reproduced with transient units) - Install Nginx and set the server name
Install Nginx from the Ubuntu repository, set the default site to your host name, then test the config and reload without dropping connections.
Ubuntu 24.04.5 LTS · nginx 1.24.0