debian
Debian-specific material
-
apt
Search, install, remove and upgrade packages with apt, including how to see what it will do before it does it, and which commands are safe in a script.
-
apt-cache
Search the package cache, read a package's record, follow its dependencies, and use policy to see which version apt would install and from where.
-
apt-file
Tested apt-file examples: searching Debian's file index for a command you have not installed, and the substring trap in a plain pattern.
-
dpkg
Query what's installed, find which package owns a file, inspect a .deb before trusting it, and repair a half-finished install: the layer beneath apt.
-
sudo
Tested sudo and su examples: running one command as root, what the environment loses on the way, the redirect that still runs as you, and reading sudoers.
-
which
Tested which examples: how PATH order decides the answer, the shell script Debian ships in place of the GNU program, and the deprecation that was reversed.
-
Could not get lock /var/lib/dpkg/lock-frontend
apt refuses to run because something else is already installing. Modern apt tells you exactly which process, and deleting the lock file is the wrong fix.
-
The following packages have been kept back
apt-get upgrade refuses to install new packages, so an upgrade that needs one is held back instead. What the message means and the three things that cause it.
-
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.
-
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.
-
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.
-
sh vs bash vs dash
On Debian /bin/sh is dash, not bash. That one fact explains most scripts that work at your prompt and fail the moment something else runs them.
-
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, why the suite name in your sources file matters more than you think, 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.
-
Adding a third-party repository safely
Why apt-key is gone, how Signed-By scopes a vendor's key to their repository alone, and how to stop that repository replacing the rest of your system.
-
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.