DPKG Installation Tools (Demo)
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:00
>> Hey, Cybrarians.
00:00
>> Welcome back to
00:00
>> the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Goelz.
00:00
In today's lesson, we're going to discuss using
00:00
dpkg tools to install DEB packages.
00:00
Upon completion of today's lesson,
00:00
you're going to understand how to use
00:00
the dpkg command to work with Debian or deb files.
00:00
We're also going to use apt, apt-get,
00:00
and apt-cache to work with Debian files
00:00
and we're going to work with the Graphical Aptitude tool.
00:00
Now, a brief overview on
00:00
these three types of package managers;
00:00
dpkg is the command line tool that's used to
00:00
manage DEB packages in Debian-based distros,
00:00
so that's going to be something like Ubuntu.
00:00
Apt-get is a package manager that is used, apt-get,
00:00
think of it in the place of
00:00
Yammer or DNF when you're talking about Debian and dpkg,
00:00
you can think of it in the place of
00:00
RPM when you're talking about Debian.
00:00
Then finally, aptitude is a half text-based,
00:00
half graphical package manager and
00:00
it works just like apt-get to install packages.
00:00
Let's take a look at these with some demo time.
00:00
[NOISE] Here we are
00:00
in a Ubuntu environment
00:00
and the first thing we're going to do is just
00:00
become root for just
00:00
making things move a little bit quicker and let's
00:00
actually cd to the root home directory
00:00
and do a list in here.
00:00
We can do, and I'll ask them to see that we have
00:00
apache 2 and pigeon.
00:00
Like RPN, dpkg doesn't install package dependencies,
00:00
if we do a dpkg dash i 4 install on apache 2,
00:00
sorry, we're going to actually need
00:00
to specify the entire name.
00:00
I'm going to dot slash this,
00:00
let me put a dot slash in front of
00:00
it and we'll go like this.
00:00
There we are. What do we see?
00:00
Just like we saw with RPM,
00:00
it says we have dependency problems that
00:00
prevent configuration of apache 2,
00:00
we would need to download these other packages like
00:00
apache 2 ban and utils
00:00
the data in order to install apache.
00:00
But let's do it clear here and let's try and do
00:00
a dpkg installed on pigeon,
00:00
which we also have in this directory and if we hit Enter,
00:00
then it's going to install properly because all of
00:00
the dependencies have been met and it's not an issue.
00:00
Now, just like what we saw with yum and D and F,
00:00
we can get information on the packages installed.
00:00
We could do that with dpkg dash capital
00:00
I and we'll do that for pigeon.
00:00
That tells us about the debian package, the name,
00:00
the version and the architecture
00:00
and then also down here it's going to tell
00:00
us all about the description of
00:00
the package that we just installed.
00:00
If we wanted to see all the files
00:00
that got installed with pigeon,
00:00
we could do a dpkg space, capital L,
00:00
dash capital L, and the common
00:00
pigeon and we can
00:00
see all the files that got
00:00
installed along with the package.
00:00
Finally, if we wanted to remove the package,
00:00
we could a dpkg dash R for remove on pigeon
00:00
[NOISE] and we can see that the package
00:00
actually got removed and all of
00:00
the other things that had its dependencies removed.
00:00
Now we can check and see that it's removed by doing
00:00
[inaudible] and it says that it's not there.
00:00
We can actually try and do in Oregon to remove
00:00
once more and it'll say it's not installed.
00:00
That's how we can tell that that's not installed,
00:00
but that's all we really need to know
00:00
about using a dpkg command.
00:00
Let's move on and look at apt.
00:00
Now the apt or apt-get tool can be
00:00
used to install packages and their dependencies.
00:00
Like we saw before, we can install apache 2,
00:00
we can do that here,
00:00
but let's do this first.
00:00
Anytime you're working with apt or apt-get,
00:00
the first thing that you want to do is run an update.
00:00
Now this isn't going to actually update
00:00
installing packages on the system,
00:00
really all it does is it goes out through the repository,
00:00
is reads the package list and make sure that you
00:00
have the most up-to-date information
00:00
for apt so that it can
00:00
make good decisions about what needs to be installed.
00:00
Understand what packages are out there and what
00:00
dependencies are needed to make things happen.
00:00
Where we couldn't install apache 2 before,
00:00
let's try and just do an app
00:00
installed on apache 2 and see what happens.
00:00
Now, we can see that,
00:00
I apologize, because we
00:00
tried to install this with DNF and it broke.
00:00
It didn't actually work properly.
00:00
Let me show you another command will do
00:00
an app purge on apache
00:00
2 and this will remove anything that we don't
00:00
need that got stuck out there in the system.
00:00
This is just coming up because we tried to do that
00:00
dpkg install on apache 2 and it failed.
00:00
Let's clear our screen and now we'll do
00:00
an app install apache
00:00
2 and now we can see that it can be installed.
00:00
We can hit Y to continue
00:00
and it's going to pull down and install
00:00
everything we needed and now
00:00
apache will be installed on the system.
00:00
If we want to see the information about the package,
00:00
about what got installed,
00:00
we can use a command called app cache.
00:00
Let me clear the screen and we'll run app cache
00:00
[LAUGHTER] show apache 2.
00:00
This will show us all the information about the package.
00:00
It'll show us the architecture,
00:00
the description and so on and so forth.
00:00
Just like we saw with young men authority and FIFO.
00:00
But here we use app cache
00:00
and then the name of the package.
00:00
If we wanted to see all of the installed packages,
00:00
what you can do is run
00:00
the command, lets clear our screen.
00:00
At cache pkg names.
00:00
This will show us all the packages that are installed.
00:00
Now if we wanted to uninstall
00:00
the HTTP package that we just installed,
00:00
we can actually just do an apt remove apache 2.
00:00
Clear our screen and
00:00
this will tell us that it's going to remove
00:00
everything we had installed then hit y to do that
00:00
[NOISE] and it will remove everything.
00:00
It'll actually update a firewall profile here
00:00
for Engine X HTTP as well.
00:00
Let's go ahead and do a search for
00:00
our favorite other package which is pigeons.
00:00
We do an app search for
00:00
pigeon [NOISE] and that
00:00
will tell us if it's out there and yeah,
00:00
it's out there and there's
00:00
quite a bit of stuff out there.
00:00
We can find pigeon, that's no problem.
00:00
If we wanted to update all packages,
00:00
we can do an app upgrade.
00:00
We can actually run this and it'll
00:00
tell us what packages there are to update.
00:00
Let's just go ahead and hit Run on
00:00
that and we can see that it will
00:00
install 424 megabytes of
00:00
additional disk space on the system.
00:00
Just like we saw with CentOS and
00:00
the previous lesson or lessons,
00:00
I have a little bit of updating
00:00
to do, but we're not going to do that.
00:00
We're just going to move forward, we're going to hit
00:00
end to stop that and
00:00
the other thing that we can do in apt
00:00
is we can actually do an app clean,
00:00
this is just like a young clean all.
00:00
This will just clean up a system and
00:00
make sure that everything is
00:00
nice and clean and ready to go.
00:00
[NOISE] Let's clear our screen
00:00
here and move on to our last command,
00:00
the aptitude tool, which provides
00:00
text-based interactive package management.
00:00
Here's the aptitude and
00:00
we see it's going to load the cache here and is
00:00
going to provide us with a menu.
00:00
If we wanted to and say install apache 2,
00:00
what we can do is we can arrow down to not
00:00
install packages and then we can
00:00
go all the way down here to
00:00
the WBS and we find web and hit Enter on it.
00:00
We go to mean and then we would try and find apache
00:00
2 somewhere in here if we needed to install it.
00:00
Now installed packages and scroll down
00:00
web, there is apache 2.
00:00
We could click the Plus button
00:00
if we wanted to install it.
00:00
And there we go, and then if
00:00
we want to install it, once we've installed that,
00:00
we can type the G and it'll install it generally,
00:00
although we would have to do
00:00
a purging end because it's being a
00:00
little funky with us, but that's how you do it.
00:00
After the install completes,
00:00
you'd hit Return and this will
00:00
bring us back into aptitude.
00:00
Move or navigate to the same place.
00:00
You can go back into install packages.
00:00
Let's actually just hit,
00:00
I'll say Q up here to
00:00
get back to where we were and we'll quit aptitude.
00:00
Let's go back in and
00:00
then what we can do is we can go into install packages.
00:00
Then we can go down to
00:00
our web and we can search mean for apache.
00:00
Now, it didn't actually get installed
00:00
because we had some problems with it,
00:00
but if we wanted to remove it here,
00:00
we can type minus,
00:00
then hit G and it would remove the program.
00:00
But we're just going to go ahead and quit out of it.
00:00
We just want to show you a little bit of an overview
00:00
of aptitude there and that's
00:00
really all you need to know about aptitude,
00:00
apt and dpkg.
00:00
[NOISE] With that, we've reached
00:00
the end of the lesson and in this lesson we covered
00:00
the dpkg command for installing individual that packages.
00:00
We also work with apt,
00:00
apt- get and apt- cache for installing
00:00
deb packages and doing package management,
00:00
and we got a little bit of an overview of the aptitude,
00:00
text-based GUI package management tool.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next
Instructed By
Similar Content