including
apt
and
apt-get
, were designed to address these shortcomings and could automatically
resolve these issues. We will talk about both
dpkg
and the APT tools in this chapter.
The base command for handling Debian packages on the system is
dpkg
, which performs installa-
tion or analysis of
.deb
packages and their contents. However,
dpkg
has only a partial view of the
Debian universe: it knows what is installed on the system and whatever you provide on the com-
mand line, but knows nothing of the other available packages. As such, it will fail if a dependency
is not met. APT addresses the limitations.
APT is a set of tools that help manage Debian packages, or applications on your Debian system. You
can use APT to install and remove applications, update packages, and even upgrade your entire
system. The magic of APT lies in the fact that it is a complete package management system that
will not only install or remove a package, but will consider the requirements and dependencies of
the packaged application (and even their requirements and dependencies) and attempt to satisfy
them automatically. APT relies on
dpkg
but APT differs from
dpkg
, as the former installs the latest
package from an online source and works to resolve dependencies while
dpkg
installs a package
located on your local system and does not automatically resolve dependencies.
If you have been around long enough to remember compiling programs with
gcc
(even with the
help of utilities such as
make
and
configure
), you likely remember that it was a painful process,
especially if the application had several dependencies. By deciphering the various warnings and
error messages, you may have been able to determine which part of the code was failing and
most often that failure was due to a missing library or other dependency. You would then track
down that missing library or dependency, correct it, and try again. Then, if you were lucky, the
compile would complete, but often the build would fail again, complaining about another broken
dependency.
APT was designed to help alleviate that problem, collate program requirements and dependencies,
and resolve them. This functionality works out-of-the-box on Kali Linux, but it isn’t foolproof. It
is important that you understand how Debian and Kali’s packaging system works because you will
need to install packages, update software, or troubleshoot problems with packages. You will use
APT in your day-to-day work with Kali Linux and in this chapter, we will introduce you to APT
and show you how to install, remove, upgrade, and manage packages, and even show you how to
move packages between different Linux distributions. We will also talk about graphical tools that
leverage APT, show you how to validate the authenticity of packages, and delve into the concept
of a rolling distribution, a technique that brings daily updates to your Kali system.
Before we dig in and show you how to use
dpkg
and APT to install and manage packages, it is
important that we delve into some of the inner workings of APT and discuss some terminology
surrounding it.