sysadmin
System administration tasks
-
Permission denied
The message names the path and never the reason. Work out which check failed, which account was refused, and when the mode is not the thing doing the refusing.
-
The repository does not have a Release file
apt asked a repository for dists/<suite>/Release and got a 404. Telling an archived release from a typo and from a flat repository, and what each one needs.
-
The repository is not signed
apt cannot verify a repository's signature: the NO_PUBKEY and Missing key errors. What Debian 13 changed, and why apt-key adv is no longer the fix.
-
Works in the shell, fails in cron
cron hands a job five variables and a PATH of /usr/bin:/bin, runs it from your home directory under dash, and sends the failure somewhere you are not looking.
-
A service won't start
A service will not come up, and systemctl either reported a job failure or stayed silent. Read the status, read the journal, then branch on the code.
-
sudo: command not found
On Debian, sudo is often simply not installed, and your user is not in the sudo group. Why the installer does that, and how to fix it from a root shell.
-
Text file busy
A deploy failed because the program is running. What ETXTBSY protects, why rm then copy works, and the rename that avoids the window between them.
-
Unmet dependencies
apt refuses to install and lists unmet dependencies. The three ways it words them, what each rules out, and finding the hold or conflict behind the refusal.
-
Why is this process using so much CPU?
The machine is slow and one process is at the top of top. Find it, check whether the figure means what it seems to, see what it is doing, and make it give way.
-
Why is this process using so much memory?
A process looks huge in top, or free shows almost nothing free. Check whether memory is really short, which of RSS, VSZ and PSS to believe, and how to limit it.
-
apt upgrade vs full-upgrade vs dist-upgrade
apt-get upgrade installs nothing new, apt upgrade installs but never removes, and full-upgrade does both. dist-upgrade is the same command under an older name.
-
apt vs apt-get
The same package ships both, and they do the same job. What differs is who each is written for, and only one of them is safe in a script.
-
cron vs systemd timers
Debian ships both and uses both. What differs is where the output goes, what happens to a missed run, and whether you can test the schedule.
-
remove vs purge vs autoremove
Not three strengths of one operation. Two of them differ over configuration files; the third acts only on packages you never asked for.
-
ss vs netstat
netstat is not installed on a Debian system and ss is. The flag translations, the filter syntax netstat cannot express, and when the old name is still fine.
-
su vs sudo -i vs sudo -s
sudo -i, sudo -s, su and su - leave you as root with different directories and audit trails. Which to type, and why su fails on a stock Debian install.
-
APT essentials
The apt, apt-get, and dpkg commands that cover almost everything you'll do to manage packages on Debian, and how remove differs from purge.
-
Installing a .deb by hand
Install a downloaded .deb the way that resolves its dependencies, see what dpkg -i leaves behind when you don't, and read the package before you trust it.
-
Listing what is installed
List installed packages reliably with dpkg-query, tell what you asked for from what came along, and find out when a package arrived from the logs.
-
Debian's release channels
What stable, testing, unstable and backports each mean, what the suite name in your sources file decides, and which to run.
-
Managing services with systemd
How Debian ships, enables and starts systemd services, where unit files live, and how to override a packaged unit without ever editing it.
-
Which package provides a file
Trace a file to the package that ships it: dpkg -S for what is installed, apt-file for what is not, and the files that belong to no package at all.