You are on page 1of 2

Dpkg

dpkg --compare-
Compare version numbers,
versions v1 gt
check with echo $?.
v2 DebianGNU/Linux Reference Card
Query installed packages, Version 5.0.9 2013-10-10
dpkg-query -W --
format e.g. ${Package} http://www.debian.org/
showformat=for
${Version}
mat
${Installed-Size}\n. Getting Help
dpkg --get- Read online help for every
Write package selections to man page or man
selections > command and many
le. bash
file conguration les.
dpkg --set- command [--help, Brief help for most
Set package selections from
selections < -h] commands.
le.
file Find all documentation
/usr/share/ here, optional le
doc/package-name/ README.Debian contains
The Network specics.
/etc/network/ Network interface Reference, manuals, FAQs,
interfaces conguration. Web
HOWTOs, etc. at http://
Start, stop network documentation
ifup, ifdown www.debian.org/doc/
interfaces according to les Mailing lists at
[device] The community is always
above. http://lists.
Show and manipulate helpful, search for users.
debian.org/
/sbin/ip network interfaces and The Wiki at http:
routing, needs iproute. Contains all kind of useful
//wiki.debian.
ssh -X user@host Login at other machine. information.
org/
scp files user@ Copy les to other machine
host:path (and vice versa).
Installation
All information about it at
Web Server (Apache2) Installer http://www.debian.org/
/etc/apache2/ Conguration les. devel/debian-installer/
Contains virtual hosts. To Download from http://
/etc/apache2/ CD images
enable a virtual host, use www.debian.org/distrib/
sites-available/
a2ensite. E.g. to set up the network
Contains available modules boot:expert w/o DHCP or using LILO
/etc/apache2/
les. To enable a module, instead of GRUB.
mods-available/
use a2enmod.

Bugs
Bug Tracking at
All about existing and xed
Legal Notice
http://bugs.
bugs.
debian.org/
This document may be used under the terms of the See http://bugs.debian.
GNU General Public License version 3 or higher. org/package-name/, use
Conditions for copying and translations can be found Package specic
wnpp to ask for new
at http://www.debian.org/doc/manuals/refcard/, packages.
where you can always get the latest version of the reportbug Report a bug by e-mail.
reference card. Instructions at http://www.
Copyright 2004, 2010 W. Martin Borgert Reporting debian.org/Bugs/
Made by: http://www.debian.org/doc/user-manuals#refcard Reporting
Conguration Important Shell Commands APT
All system conguration pager files Show contents of les. apt-cache Show package
/etc/ les are under directory ls [files] List les. showpkg package- dependencies (needed
/etc/. mkdir directory- names packages).
Create directories.
Default text editor. May be names Install packages from
editor files apt-get install
nano, emacs, vi, joe. mv file1 file2 Move, rename les. repositories with all
package-names
CUPS at http:// Browser interface to rm files Remove les. dependencies.
hostname:631 printing system. rmdir dirs Remove empty directories. Install newest versions of all
Recongure a package, e.g. Create, eXtract, list Table of apt-get upgrade packages currently
tar [c][x][t][z][j] -f
dpkg-recongure console-common archive le, z, j for .gz, installed.
file.tar [files]
package-name (keyboard), locales .bz2. Like apt-get upgrade, but
apt-get
(localisation). nd directories Find les like -name name or with advanced conict
dist-upgrade
update- expressions -size +1000, etc. resolution.
Manage command
alternatives grep search- apt-get remove Remove packages with all
alternatives. Find search-string in les.
options string files package-names needed packages.
After changing Send signal to process (e.g. apt-get Remove packages that no
update-grub kill [-9] number
/etc/default/grub. terminate it). autoremove other packages depend on.
make-kpkg -- Create a symbolic link to a apt-cache depends List all packages needed by
Build a kernel packages ln -s file link
initrd -- le. package-names the one given.
from sources, if a
revision=2:my.1.0 ps [options] Show current processes. apt-cache
customised kernel is really List all packages that need
--rootcmd Become another user, e.g. rdepends
needed, needs kernel- su - [username] the one given.
fakeroot --uc --us root. package-names
package.
kernel_image Execute a command as root Update content listings
Create and install sudo command as normal user, see apt-le update from package repositories,
m-a a-i module third-party modules (gspca, /etc/sudoers see apt-get update
kernel_image ...), needs module- Overwrite le with output of apt-le search
command > file Search packages for le.
assistant. command. file-name
Append output of command apt-le list
command >> file List contents of a package.
to le. package-name
Daemons and System Use output of command 1 as Installs packages
cmd1 | cmd2
/etc/init.d/file Restart a service, system input of command 2. automatically if needed, can
auto-apt
restart daemon. Use le as input for replace apt-le, needs
command < file
/etc/init.d/file Stop a service, system command. auto-apt.
stop daemon. Console interface to APT,
aptitude
/etc/init.d/file Start a service, system needs aptitude.
start daemon. APT GUI interface to APT, needs
synaptic
halt, reboot, Halts, reboots, shuts down Update packages listings synaptic.
powero system. from package repositories
All log les are under this as listed in
/var/log/
directory. apt-get update /etc/apt/sources.list. Dpkg
Default values for many Required whenever that le dpkg -l [names] List packages.
/etc/default/
daemons and services. or the contents of the dpkg -I pkg.deb Show package information.
repositories change. dpkg -c pkg.deb List contents of package le.
Search packages and Show which package a le
apt-cache search dpkg -S filename
Important Shell Commands descriptions for search- belongs to.
search-string
cat files Print les to screen. string. dpkg -i pkg.deb Install package les.
cd directory Change to directory. apt-cache policy Show versions and priorities Audit check sums of
cp files dest Copy les and directories. package-names of available packages. debsums installed packages, needs
echo string Echo string to screen. apt-cache show Show package information debsums.
gzip, bzip2, xz [-d] package-names incl. description. dpkg-divert Override a packages
Compress, uncompress les. [options] file version of a le.
files

You might also like