Introduction to Debian

Table of Contents

Debian basics

We noticed that not only Debian-users like grml but also people coming from the BSD-section, Gentoo-Linux and so on. You don’t need any debian-knowledge to use grml, but if you would like to use the package management you should know some basics. The following table provides a comparison of the packagement of debian compared with some other well known package management systems:

Package management of *nix

Action Debian Gentoo RPM OpenBSD BSD Ports
useful tools apt-fileapp-portage/esearch, app-portage/portage-utils, app-portage/gentoolkit, app-portage/eix yum, rpmbuild ... ...
search for foobar apt-cache search foobaremerge search foobar or esearch foobar ... grep foobar index.txtcd /usr/ports/ && make search key=foobar
show all packages that match ‘pattern’dpkg -S patternqfile pattern or equery b(elongs) pattern ... grep foobar index.txtcd /usr/ports/ && make search key=foobar
list files in installed $package dpkg -L $packageqlist $package or equery f(iles) $packagerpm -q --list $packagepkg_info -L $package ...
list files in local $package dpkg -c $package.deb ... rpm -qpl $package.rpm ... ...
show description of $package apt-cache show $package eix -S $package rpm -qpi $packagepkg_info $package ...
show dependencies of $package apt-cache depends $packageemerge -pv $packagerpm -qpR $packagepkg_info -r $package ...
show reverse dependencies of $packageapt-cache rdepends $packageequery d(epends) $package (1) or qdepends -a $package ... pkg_info -k $package ...
show policy for $package apt-cache policy $packageemerge search $package ... pkg_info $package ...
update list of packages (/etc/apt/sources.list) apt-get updateemerge sync (or esync, also rebuilds index for esearch)rpm --rebuilddbwget ftp://ftp.openbsd.org/release/packages/`arch`/index.txt ...
upgrade software apt-get upgradeemerge -u foobarrpm -U $packagepkg_add -r $package ...
simulate upgrade apt-get -s upgradeemerge -pvut foobar ... (before replacing, it is always simulated) ...
simulate installation of package dpkg -i --no-act $package.deb emerge -pv $package rpm -i --test $package.rpm ... ...
upgrade the distribution (including dependencies) apt-get dist-upgradeemerge -uD world ... run install ISO or Download all Install sets to the local HDD and move the new “bsd.rd” to /bsd. After the reboot choose “upgrade” and install the install sets from HDD. After the installation use pkg_add -u to upgrade your installed software too. ...
install $package apt-get install $packageemerge $packagerpm -i $packagepkg_add $package cd /usr/ports/<category>/<package> && make install [clean]
install a specific version of $package apt-get install $package=versionemerge =$package-version ... version info is contained in package name ...
install $package from specific release apt-get -t release install $packageedit /etc/portage/package.keywords ... fetch another index.txt from a different release (it is NOT recommented to use Versions for another release) ...
remove $package apt-get remove $packageemerge -C $packagerpm -e $packagepkg_delete $package ...
remove $package and purge configuration files apt-get --purge remove $packageCONFIG_PROTECT=”" emerge -C $package ... that is the default ...
reinstall $package apt-get --reinstall install $packageemerge $packagerpm -U --force $packagepkg_add -r $package ...
download .deb files of $package apt-get --download-only install $package ... ... wget `grep pkgname index.txt` ...
download source of $package apt-get source $packageemerge -f $package ... cd /usr/ports/<category>/<package> && make fetch ...
install debian package dpkg -i $package.deb ... rpm -i $packagepkg_add $package ...
show installed and removed packages dpkg -lqlist -I -vrpm -qals /var/db/pkg/ ...
show status of $package dpkg -l $package eix $package ... pkg_info $package ...
show all packages that match ‘pattern’dpkg -S patternemerge search foo or qsearch foo or esearch foorpm -qa PIPE grep patterngrep pattern index.txt ...
re-run the configuration for $package dpkg-reconfigure $package ... ... vi /usr/local/etc/<package>.conf ...
show update status apt-get [dist-]upgrade ... ... pkg_version $package ...

(1) list all direct dependencies matching pkgspec

Another frontend and easy to handle system to the debian package management is the ncurses based ‘aptitude’. ‘aptitude’ can also be used in a console-oriented way (like apt-get). Just replace ‘apt-get’ in the above commands with ‘aptitude’. As of Debian Sarge this is even the prefered way to install and upgrade packages, as ‘aptitude’ is better in handling dependencies.

For handling /etc/apt/sources.list take a look at the apt-howto basics, for further information on package management read chapter 3 of apt-howto.

Using the grml-repository

See grml.org/files/ for instructions how to use the grml-repository. You can use the grml-repos even if you don’t use a grml-system but any other Debian system. With introduction of apt-0.6 it’s possible to check integrity of the packages. The following warnings will disappear then:

W: GPG error: http://deb.grml.org grml-stable Release:
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY F61E2E7CECDEA787
WARNING: The following packages cannot be authenticated!

For the grml-repository just run:

apt-get --allow-unauthenticated install grml-debian-keyring

or:

gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
gpg --export F61E2E7CECDEA787 > /etc/apt/grml.key
apt-key add /etc/apt/grml.key

Or if you do not want to store the key in a file:

gpg --keyserver subkeys.pgp.net --recv-keys F61E2E7CECDEA787
gpg --export F61E2E7CECDEA787 | apt-key add -

Links/Resources

General

Getting help

Packages/Bugs

Developers