Тема: debian
-
Обновление Debian и Ubuntu до следующего основного выпуска с сохранением возможности отката
И do-release-upgrade в Ubuntu, и ручная процедура Debian с изменением списка источников и последующим обновлением предполагают наличие полной резервной копии и резервного доступа через консоль на случай обрыва SSH-соединения во время обновления; сами примечания к выпуску Debian рекомендуют сначала выполнить минимальное обновление, а затем полное.
-
Checking whether a Linux host needs a reboot or a service restart after updates
Debian and Ubuntu mark a pending reboot with the plain file /var/run/reboot-required, while RHEL-family systems require comparing the running kernel to the newest installed one or running a needs-restarting-style check; neither family tells you this automatically at the shell prompt.
-
Configuring network interfaces with netplan on Ubuntu, and testing changes without losing the connection
Netplan renders YAML under /etc/netplan into networkd or NetworkManager configuration; `netplan try` applies a change and automatically reverts it if nobody confirms within a timeout, which is the safe way to change network settings on a remote host. Debian's ifupdown /etc/network/interfaces is the older, still-supported contrast.
-
Setting locale, timezone and reconfiguring packages non-interactively on Debian and Ubuntu
localectl, timedatectl and update-locale change locale and timezone without a text-mode dialog, and dpkg-reconfigure -f noninteractive re-runs a package's debconf-driven setup the same way a script would run the original install, both usable in provisioning scripts with no terminal attached.
-
Современное добавление стороннего репозитория APT: файлы deb822 .sources и наборы ключей Signed-By
apt-key устарел; поддерживаемый способ добавить подписанный сторонний репозиторий — файл набора ключей в /etc/apt/keyrings, на который ссылается параметр Signed-By, в классической однострочной форме либо новом формате deb822 .sources, который понимают Debian 12/13 и современные выпуски Ubuntu.
-
Проверка целостности установленных пакетов Debian и Ubuntu с debsums и dpkg --verify
debsums сравнивает установленные файлы с MD5-суммами, записанными при сборке пакета, dpkg --verify (начиная с dpkg 1.17.2) сравнивает метаданные, записанные в самой базе dpkg, а dpkg -S/-L отвечают на вопросы «какому пакету принадлежит этот файл» и «какие файлы установил пакет», прежде чем решать, нужна ли переустановка.
-
Adding a private CA to the system trust store on RHEL-family and Debian/Ubuntu
RHEL-family and Debian-family Linux keep separate mechanisms for adding a locally trusted CA certificate: update-ca-trust with anchors under /etc/pki/ca-trust, and update-ca-certificates with .crt files under /usr/local/share/ca-certificates. Using the wrong directory or extension silently leaves the CA untrusted.
-
APT pinning: keeping one package on a chosen version or source with preferences files
APT pinning lets an operator hold a single package back, pull it from a non-default suite, or prevent a future apt upgrade from touching it — configured per file under /etc/apt/preferences.d rather than by editing one shared file, and inspected with apt-cache policy.
-
Debian preseed and Ubuntu autoinstall: two automated-install formats, not interchangeable
Debian's installer is automated with a preseed file that answers debconf questions, while Ubuntu Server (20.04+) and Desktop (23.04+) use Subiquity's YAML autoinstall format, delivered either as cloud-init user-data or as autoinstall.yaml on the install media. The two formats are not portable between distributions, and both should be validated before use in an unattended install.
-
Managing installed kernels on Debian and Ubuntu: cleanup, /boot space, HWE and Livepatch
Old kernel packages accumulate in /boot until apt autoremove clears them; Ubuntu additionally offers a rolling Hardware Enablement (HWE) kernel on LTS releases and Canonical's Livepatch service for applying kernel security fixes without an immediate reboot — both Ubuntu-specific, with no Debian equivalent.
-
Running apt and dpkg non-interactively on Debian and Ubuntu without hanging on prompts
A scripted apt-get or dpkg run can stall on a debconf prompt, a modified-conffile question or a held dpkg lock. Setting DEBIAN_FRONTEND, the right confold/confdef options and preseeding debconf answers first turns an install into a command that either finishes or fails loudly.
-
Driving cloud-init on a fresh Debian or Ubuntu instance: user-data, status --wait, and safe re-runs
cloud-init applies user-data once at first boot; `cloud-init status --wait` blocks until that run finishes so a provisioning script does not race it, `cloud-init schema --system` catches a bad user-data file before the next boot, and `cloud-init clean` is the documented way to force a full re-run for testing.
-
Настройка unattended-upgrades для автоматической установки исправлений безопасности в Debian и Ubuntu
unattended-upgrades устанавливает обновления пакетов по таймеру, используя два файла: 20auto-upgrades (нужно ли обновлять и как часто) и 50unattended-upgrades (из каких источников и нужна ли перезагрузка). Проверка с --dry-run --debug до включения в рабочей среде позволяет избежать неожиданных перезагрузок или частично применённых обновлений.
-
Working with AppArmor profiles on Debian and Ubuntu: status, complain mode and local overrides
AppArmor confines individual programs by profile rather than by user; aa-status shows what is loaded and enforced, aa-complain/aa-enforce switch a profile between logging-only and blocking, and /etc/apparmor.d/local holds site-specific additions that survive package upgrades of the shipped profile.
Машиночитаемо: JSON