So in the last few videos we've been learning a whole lot about our package manager and how it works,
and we learned about the cash and what it's for, and we've learned about how to update the cash.
And I had to upgrade all of the software on our system to the newest versions using the package manager,
which is all super awesome stuff, but how can we install new packages?
That's what we want to know.
Well, with the background that you've gained from the previous videos, installing will now be really
easy to understand and not just something that you have to memorize.
And by the end of this video you will know how to install new software from the command line.
So let's go ahead and jump right into it.
Okay.
So now that we know that our cash and system are fully up to date, let's go ahead and install some
new software.
So let's say that I've heard of a program called XYZ.
And XYZ apparently makes a window with some funny eyes pop up that follow your mouse cursor around the
screen.
And I think this is interesting and I want to install it, so do that.
First, we need to know what package the XYZ program comes in.
So let's search the cache for it.
The way that we do that is we do APT cash search for XYZ and it will give us every package that has
something to do with XYZ.
And we've heard of this package called X 11 apps, let's say, and we like Ah, that's the one I've
heard of.
Let me go and have a closer look at it.
So what we do, we do apt cash show x 11 apps.
So you give it the name of the package here and that will give us a bunch of information.
But let's just clear the screen and pipe that through less.
So we get a bit of a closer look.
Okay.
And when we open this here, we can see that actually we get a lot of information about the package.
But down here in the description, it says that this package provides a miscellaneous assortment of
X applications that shipped with the X Window System, including and it all tell us that we've got something
tools for manipulating bitmap images, something for a tool that tells you when you have new email and
so on.
And then there's a one here called X Ise.
And XYZ is a demo program in which a pair of eyes track the pointer.
So that's what we want.
And we realize that actually we want to have a look at this.
There's also another one called X Man, which is a manual page browser which might be useful as well.
Okay.
So now we're pretty convinced we want to install the X 11 apps package.
How can we do that?
Well, it's actually really easy.
All we've got to do if we get out of less is just when we clear the screen.
All we have to do if type sudo apt get install x 11 apps.
So we just enter the name of the package.
Now notice that we're using apt get again to install the package because we want our package manager
to get data from the internet and not just from the local cache.
And we also pass the package name that we want to install which and because we want to install X 11
apps, we typed x 11 apps in there.
Now when we press enter, we see that it'll ask for our password, which we enter, and then the package
manager is going to go ahead and install the new packages with any dependencies that are actually required.
Now sometimes it might ask for your permission if it needs to install a lot, but because it's only
installing about 600 kilobytes, it was like, Yeah, let me just go ahead and install it then.
I don't need to ask for permission for something that's so small.
Okay, but there's nothing we need to do.
The package is installed and it's as simple as that.
Now X11 Apps is a pre compiled package, also known as a binary package.
Now most packages are binary packages, which means that the code that make the software has been pre
compiled and ready to go beforehand.
So you don't have to do any of that.
Configure, make and make install stuff that we did a few videos ago yourself.
Okay, just install the package from the repositories and you're done.
And what's better, the package will also be tracked for updates so you can update the package if new
updates are made available.
How awesome is that?
Now let's try out our new software.
So we wanted to use the Xs program.
So if we just click the screen and type X I's in there and press enter, we'll see that we get these
funny googly eyes pop up on the screen that follow our mouse around.
So if I put the mouse down here or was it gone?
I scared away the eyes.
If I pop him up here, then it will follow around.
Probably not as fluidly as I'd like, but I'm going to put that down to us running this in a virtual
machine.
But if like, you know, it does follow it a whole lot nicer, but that's pretty cool right now.
The awesome thing is the way that you everything you install will come with its own man page.
So if I just close XYZ here, then if I do man XYZ, you'll see that it's actually now also got a manual
page installed and it says a follow the mouse x demo and it's also got some options so you can even
control the XYZ program from the command line.
And we can see here that there is a there is an option here called center, which allows you to choose
a different color for the center of the eyes.
So, for example, if we do X eyes, then give it the center option and tell it.
I think it's two dashes center blue.
Whoops.
Nope.
Maybe just one.
Maybe just one dash.
There we go.
Now, the center of the eyes is blue.
And but I want I want you to notice here is the way that look, when you open the Xs program graphically,
you don't have the option to change the color of the eyes.
Right?
But from the command line, you can change that and a whole lot more.
So this is highlighting for you just how powerful the command line is and how it does give you more
abilities than is possible with a graphical editor.
And if you can't edit the color of googly eyes, then tell me what really is the point of having a computer?
Now the X11 apps package came with quite a few other pieces of software inside, one of which is called
X Man, which you might find useful.
Now X Man is a graphical window for looking at the manual pages.
So if we get rid of XYZ here and close it and then we type X man, we'll see a window pop up over here.
Now you can search the man pages using.
So if we click on manual page right there, it'll open up a bigger window.
And if we click on the on the options at the top here, if we hold down the mouse button, it shows
the menu.
So you need to hold down the mouse button and you'll see this dropdown menu.
Then if you go on search and let go of the mouse, that is if we've clicked the search thing and now
we can search for something in here.
So this is, for example, if we take a look at RLS and we try to look at it as a manual page, then
it will open up the RLS manual page and you can browse through it here.
So this is a more, I guess, graphical way of taking a look at the manual pages than you do with the
command line.
But I guess it just makes it look a bit prettier.
And you can also look at the sections so you can look in user commands and you can see all of the user
commands here.
And if I wanted to look at, let's say, the the address to Line Command, I'll just click on that and
it will open up.
So it's a nice graphical way of browsing through the manual.
So that's something that you can play around with if you like.
And one thing I also want to highlight is how we by installing one package, the X 11 apps package,
we've actually installed multiple different pieces of software, which is super cool.
And we didn't have to do any compiling, we didn't have to do any configuring.
All we have to do is make sure that our package list was up to date using sudo apt get update and then
all we had to do then was just pseudo apt get install and then a package name and that's it.
We can we can rest assured that we've got the most up to date version of that package and it's all,
it's all sorted.
We didn't even have to find out if the package was suitable for our computer's architecture and decide
between, you know, i386 or AMD 64 that was all catered for automatically, which is awesome, but
all of the software in that package was pre compiled.
So what if we wanted to utilize the freedoms that free software gives us and access the source code
for a package and modify it?
Well, accessing the source code from the repositories is also very easy, but there are a few edits
that you need to make.
So for all that freedom, goodness.
I'll see you in the next video.