Linux

Package Management: APT & dpkg

54 flashcards · answers and spaced-repetition review in the KnowCard app

You run apt install right after a fresh Debian install and it keeps prompting you to reinsert the installation DVD instead of downloading from the internet. What causes this and how do you fix it?
On Debian, the default sources.list only enables free packages, but you need the proprietary NVIDIA driver. What must you add to the source lines first?
On Fedora, why is running dnf update in the terminal often preferable to using the graphical Software Update, especially for a first big update?
On Fedora the SSH server is installed but the daemon isn't running after boot. What single command both enables it at boot and starts it now?
Fresh Fedora and openSUSE installs can't play many audio/video formats and lack the NVIDIA driver. What kind of source fixes this, and what is each distro's most popular one?
Arch and Manjaro don't use apt or dnf. What command handles package management there, and what extra GUI does Manjaro ship?
To make an Ubuntu desktop play MP3 and other proprietary media formats out of the box, which single meta package do you install?
Two package formats dominate Linux. Which format goes with which command family, so you know which distro you're on?
Why can't you just use rpm or dpkg alone to install a package from the internet, and what layer do DNF, ZYpp and APT add on top?
A colleague suggests installing a Red Hat RPM on a SUSE box to save time. Why is mixing packages across distributions a bad idea?
For DEB packages there are three front-end commands: apt, apt-get and aptitude. What is each one best suited for?
Which dpkg action removes a package but leaves its config files, and which one also wipes the configuration?
In dpkg --list output you see one package marked ii and another marked rc. What does each of those two-letter codes tell you?
A dpkg status code has two (sometimes three) letters. What do the first and second letters each represent?
How would you describe what APT is to someone who already knows DNF or ZYpp on the RPM side?
What is the column layout of a line in an APT sources.list file, and what values does the first field take?
Where does APT keep its configuration, and where should extra third-party source definitions go rather than the main file?
You find a tutorial that adds a third-party repo key with apt-key. Why is that the wrong approach now, and what replaces it?
A user installs a package and complains the version is old. They never ran apt update. Why does that matter, and what does apt update actually do?
What is the practical difference between apt upgrade and apt full-upgrade, and which is the usual choice?
After removing a package with apt remove, leftover dependency packages are still taking up space. Which command cleans those up, and why doesn't remove do it?
You install an editor with apt and are surprised it also pulls in a mail server. What default apt behavior causes this, and how do you avoid it?
How do you upgrade a Debian/Ubuntu machine to the next major release from the command line, and what must you change first?
Why is apt-get, not apt, the tool of choice inside a Dockerfile or automation script, and what's the naming quirk to watch for?
What is a Debian meta package, and what does installing build-essential actually do?
You need low-level details about an available package, or want an audit trail of what APT has done. Which command and which log file cover these?
What package performs automatic apt updates on Debian/Ubuntu, and what mechanism triggers it now that cron jobs are no longer used?
After automatic kernel updates, how can a script tell whether the machine needs a reboot, without rebooting on its own?
An apt command fails with unable to get exclusive lock even though you closed the other tool. What's the underlying rule, and how do you recover from a stale lock?
A stray config file is on your system and you want to know which package owns it, and later, every file that package installed. Which two dpkg queries answer this?
Coming from Windows where each app ships its own setup.exe, what fundamentally different model does Linux use for installing software, and what does that buy you?
Google Chrome, and now Firefox and Thunderbird, bundle their own copies of libraries instead of using the system's. Why do that, and what's the cost?
dpkg keeps a description, file list and dependency data for every package. In what format is that metadata stored, and how can you query it directly?
You mis-answered the Postfix mail server's setup questions during install. Since Debian ran those config scripts automatically at install time, how do you get them back?
You're rebuilding a machine and want the exact same set of packages installed on a fresh box. Which dpkg pair exports and replays that list?
The same package is offered by three lines in your sources.list, and you notice component names differ between Ubuntu and Debian. Which source wins, and why do the component columns differ?
How does APT know that a downloaded package hasn't been tampered with, and what one condition must be met for that check to work?
apt-get has no list/search/show subcommands, but plain apt does. Which apt commands browse the catalog, and which one frees up disk from old downloads?
You want to download and tinker with a package's actual source code via APT. What must be enabled in your sources, and what command fetches the source?
Besides meta packages like build-essential, Debian/Ubuntu have a second way to install whole package groups, especially handy during installation. What is it?
You installed unattended-upgrades but nothing updates automatically. Which two APT::Periodic settings actually switch it on, and why drop them in a file named 99myown?
With unattended-upgrades running, how do Ubuntu and Debian each decide which packages auto-update, and what's each one's default scope?
For automatic updates you want to skip one specific package and have the box reboot itself after kernel updates. Which two unattended-upgrades settings do that?
Two Java versions are installed, yet typing java always runs one specific version. What Debian-originated mechanism decides that, and how is it wired?
How do you find out which commands even have alternatives configured, and see the versions available plus the current default for one of them?
You want a specific package pinned so system upgrades never touch it. How do you put it on hold with dpkg, and what does hold actually do?
In automatic mode, how does update-alternatives choose the active version, and how do you override it to force a specific one (then hand control back)?
Debian sorts every package into one of four groups by licensing. What are they, and what changed for firmware in Debian 12?
Ubuntu enables four package components by default. What does each contain, and, importantly, who maintains and supports it?
An Ubuntu developer publishes a newer LibreOffice outside the official archives. What is that channel called, and how do you add one and install from it?
Ubuntu LTS advertises a five-year update guarantee. What's the catch about which packages that covers, and how can you check what's actually being serviced?
Beyond standard LTS support, what does Ubuntu Pro add, how do you turn it on, and what's the quirk for free users?
How do you kick off an Ubuntu release upgrade from the command line, and what stops it from jumping to a non-LTS release?
Your Ubuntu box's GUI won't start because the NVIDIA driver is missing. How do you find and install the right proprietary driver entirely from the terminal?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play