Dpkg
Query installed packages,
format e.g.
dpkg-query -W '${Package} Debian Reference Card
--showformat= Version 12 – Debian 12 ’Bookworm’ – 2023-03-22
format ${Version} https://www.debian.org/
${Installed-Size}\n'
Getting Help
dpkg Read online help for every
Write package selections to man page or man
--get-selections command and many
file. bash
> file configuration files.
dpkg command [--help, Brief help for most
Set package selections from
--set-selections -h] commands.
file.
< file Find all documentation
/usr/share/ here, optional file
doc/package-name/ README.Debian contains
The Network specifics.
Interface configuration (if Reference, manuals, FAQs,
/etc/network/ Web
not controlled via HOWTOs, etc. at https:
interfaces documentation
network-manager). //www.debian.org/doc/
Start, stop network Mailing lists at
if [up][down] The community is always
interfaces according to the https://lists.
device helpful, search for users.
file above. debian.org/
Show and manipulate The Wiki at
Contains all kind of useful
ip network interfaces and https://wiki.
information.
routing, needs iproute2. debian.org/
ssh -X user@host Login at another machine.
scp files Copy files to other machine
user@host:path (and vice versa). Installation
All information about it at
Installer https://www.debian.org/
devel/debian-installer/
Download from https://
CD images
www.debian.org/distrib/
E.g. to set up the network
boot: expert w/o DHCP or to adapt
bootloader installation.
Containing the user-friendly
Or use a Live Calamares installer:
image https://www.debian.org/
CD/live/
Legal Notice Bugs
This document may be used under the terms of the GNU Bug Tracking at
All about existing and fixed
General Public License version 3 or higher. The license https://bugs.
bugs.
text can be found at https://www.gnu.org/copyleft/ debian.org/
gpl.html and /usr/share/common-licenses/GPL-3. See https://bugs.debian.
org/package-name/, use
Copyright © 2004, 2010 W. Martin Borgert Package specific
wnpp to ask for new
Copyright © 2016, 2019, 2023 Holger Wansing
packages.
Made by: https://www.debian.org/doc/user-manuals#refcard
Bugs Important Shell Commands APT
reportbug Report a bug by e-mail. gzip, bzip2, xz [-d] apt show -a Show package information
Compress, uncompress files.
Instructions at files package-name incl. description.
Reporting https://www.debian.org/ pager files Show contents of files. Install packages from
apt install
Bugs/Reporting ls [files] List files. repositories with all
package-names
mkdir dependencies.
Create directories.
directory-names Install newest versions of all
Configuration mv file1 file2 Move, rename files. apt upgrade packages currently
All system configuration rm files Remove files. installed.
/etc/ files are under directory rmdir dirs Remove empty directories. Like apt upgrade, but with
/etc/. Create (c), extract (x), list apt full-upgrade advanced conflict
tar [c][x][t][z][j][J]
Default text editor. May be table of (t) archive file, z for resolution.
editor files -f file.tar [files]
nano, emacs, vi, joe. .gz, j for .bz2, J for .xz. apt remove
Remove packages.
CUPS at http: Browser interface to find directories Find files like -name name package-names
//hostname:631 printing system. expressions or -size +1000, etc. Remove packages that no
apt autoremove
Reconfigure a package, e.g. grep other packages depend on.
dpkg-reconfigure keyboard-configuration search-string Find search-string in files. apt depends List all packages needed by
package-name (keyboard), locales files package-name the one given.
(localization). Create a symbolic link to a apt rdepends List all packages that need
ln -s file link
update- file. package-name the one given.
Manage command ps [options] Show current processes. Update content listings
alternatives
alternatives. Send signal to process (e.g. apt-file update from package repositories,
options
After changing kill [-9] PID terminate it). Use ps for see apt update.
update-grub PID. apt-file search
/etc/default/grub. Search packages for file.
Become another user, e.g. file-name
su - [username]
root. apt-file list
List contents of a package.
Daemons and System Execute a command as root package-name
systemctl sudo command as normal user, see Console interface to APT,
Restart a service, system aptitude
restart /etc/sudoers. needs aptitude.
daemon. Overwrite file with output of GUI interface to APT, needs
name.service command > file synaptic
systemctl stop Stop a service, system command. synaptic.
name.service daemon. Append output of command
command >> file
systemctl start Start a service, system to file.
name.service daemon. Use output of command 1 as Dpkg
cmd1 | cmd2
systemctl halt Halts system. input of command 2. dpkg -l [names] List packages.
systemctl reboot Reboots system. Use file as input for dpkg -I pkg.deb Show package information.
command < file
systemctl poweroff Shuts down system. command. dpkg -c pkg.deb List contents of package file.
systemctl suspend Suspends system. Show which package a file
dpkg -S filename
systemctl belongs to.
Hibernates system. APT dpkg -i pkg.deb Install package files.
hibernate
All log files are under this Update packages listings dpkg -V Audit check sums of
/var/log/ from package repositories [package-names] installed packages.
directory.
Default values for many as listed in dpkg-divert Override a package’s
/etc/default/ apt update /etc/apt/sources.list. [options] file version of a file.
daemons and services.
Required whenever that file dpkg --compare-
Compare version numbers;
or the contents of the versions v1 gt
view results with echo $?.
Important Shell Commands repositories change. v2
cat files Print files to screen. Search packages and
apt search
cd directory Change to directory. descriptions for
search-string
cp files dest Copy files and directories. search-string.
echo string Echo string to screen. apt list -a Show versions and archive
package-name areas of available packages.