Hello, the beautiful people.
Now, in the last video you saw how you can compile source code from scratch and install it on your
machine.
Now, this is a great process for understanding and customizing the software running on your computer,
but for most everyday things it's usually just a bit too much work.
So what if you could have a library of software that you can browse and have all pre compiled and ready
to go with the push of a button or run of a command?
Well, that's exactly what the software repositories and package managers are for.
And in this video, we'll be covering what they're all about.
So in this video, you're going to learn about the different software repositories that are available
on Ubuntu and how to search them using the online websites.
And by the end of the video you'll know what the different Ubuntu repositories are and you'll also know
what a package manager is.
So this lecture is going to be jam packed with useful information.
So let's go ahead and get right into it.
Okay.
So the first thing we need to know is what a software repository is.
So think of a software repository as a big library filled with software.
Now, when you go to a library, you can search for books, you can read about the books, you can look
at different versions of the books, and you can compare which books that you might want to borrow and
then check them out at the library.
And a software repository is like a library, except you don't have to give the software back.
And even better, when a new version of the software comes along, you can automatically update that
piece of software and all the software on your entire system to the new versions that are available
with a simple command.
And this helps keep your system secure and reliable and it's also totally epic.
Now in Ubuntu there are four different repositories and each repository stores a different type of software
and they are described on the main website for Ubuntu which is a 12. com.
Now if we head over to help ubuntu dot com forward slash community four slash repositories with a capital
R and then forward slash a bond to with a capital U.
I'll put a link in the resources.
By the way, if we head over to that, we'll see information about the different repositories.
Okay.
So you see a section here that says what are the repositories?
And you can see that for a bunch too.
There are four main repositories.
Now, the main repository is the repository that holds all the software that is actively maintained
and updated by Canonical.
And Canonical is the company that created Ubuntu.
Now all the software in there is free as in freedom and is also open source.
Okay.
Now the main repository is the most reliable repository and you should try and select from suitable
software in the main repository at the first instance where possible.
Now the second Ubuntu repository is the universe repository.
Now software in this repository is also free as in freedom, and it's also open source.
However, instead of being maintained by Canonical, it is maintained by the Ubuntu community and as
a result it is therefore theoretically maybe less rigorous and more prone to bugs than the main repository.
But most of the time it's fantastic in my experience.
Now the third, the third repository in the Ubuntu system is the restricted repository.
Now the restricted repository includes proprietary software and drivers for company specific devices
such as wireless cards and so on.
Now this repository helps ensure that the devices on your computer are more likely to work out of the
box, shall we say.
But the software is usually proprietary and therefore doesn't usually give you the freedoms of the other
software it gives you.
Also, you might or might not be able to directly examine the source code of the software in the restricted
repository.
And this to spend.
This depends on the specific use case.
And the fourth and final repository is the multiverse repository.
Now the multiverse repository contains software that is restricted either by copyright or legal issues.
The software in the multiverse repository might or might not have accessible source code.
Now you can see here that the Ubuntu philosophy is generally about giving the user choice about what
software they want to use.
There are two repositories that are free and open source which are the main and the universe repositories
and there are two other repositories which which aren't free and open source or where the software is
unlikely to be.
So.
So to some people, using non free software is abhorrent and completely unacceptable, whereas to others
it will be fine if it gets the job done now.
But to leaves that choice up to you.
But of the distributions such as fedora only include free software in the repositories and do not include
software that is non free.
Now this can cause a reductions in convenience, but it has other benefits.
Now Ubuntu leaves the choice up to you as to what you prefer and now that you've been informed about
the free software debate, you're in a better position to choose for yourself.
So now that we understand what the for Ubuntu repositories are and the differences between them, let
me show you where they hang out online.
Now, I don't mean social media, but there's a link called packages dot ubuntu dot com.
So if we head over to that here, we can browse through the list of packages and we can see different
links depending upon what version of a bundle to that we're running now.
The code name will change for every new release of Ubuntu in alphabetical order.
So for example, the current one is called artful aardvark or Artful for short, and you can see what
the code name for your distribution is by using this command in the command line.
So you open up your terminal and you type in LSB, underscore release, and you give it the A option,
and it will it will print out all the information about your button to distribution.
And you can see that mine is called Artful Aardvark.
And it tells me down the bottom here, the code name is Artful.
So I would click on the artful link, which you can see here to to open to see what packages are applicable
to me.
But you can click on whatever code name is appropriate for you.
When you watch this video, it all works basically the same.
Now in here are all the packages or the package categories.
So you can see a whole bunch of categories in here.
You can see, for example, we've got things for web servers.
You can see things that we've got for fonts we've got.
Editors.
We've got documentation, databases, administration, utilities and a whole lot of other stuff programming
languages, Python and text processing video.
It just goes on and on.
There's so many different things and these are just categories.
So there's loads of different packages inside each of these categories.
But if we scroll down, we'll notice that there's a couple of important links down here.
We've got the all packages link and we've got the compact compressed text list.
So this one here is just a if I open it in a new tab, we can see that it's just a kind of text file
here with a list of every single one of the packages.
And I downloaded this text file when I was preparing the course and ran it through the word count command
and counted the amount of lines after cutting out any header information and found that there were 74,060
packages, which is crazy, but you know, it's there for you to play with.
I'm just going to close up, but we're not interested in that for this video.
What we're interested in is this link here that says all packages.
And if I click that, it'll open up a web page that shows you all the packages.
So let's just wait for that to load up a second.
So there we are.
So now we get a web page that gives us a link to each available package in Ubuntu and you may notice
that it shows you in square brackets which repository the things came from.
So we can see here that this zero add package came from the universe repository and if we scroll down
we'll be able to see some that come from other repositories as well.
We're seeing we're getting a lot from the universe repository, but you see here we've got one coming
from multiverse.
And if you find a package that doesn't have anything in a square brackets next to it, that means it's
from the main repository.
So for example, this a lib bin, you can see it doesn't have anything next to it.
That means it comes from the main repository.
So that's just something to be aware of as well.
But for now, for the purposes of this video, let's just go ahead and click on this top link, this
this package called Zero Add.
And when we click on it, we'll notice that a new Web page opens and we see that the package is called
zero, and we can see the package name right at the top.
And then in these parentheses we can see the version number of the package.
And then we can see in these square brackets the repository that the package has come from.
And as I said, if there isn't any such information, then it's from the main repository.
Okay.
And as we know, the universe repository contains most contains free and open source software, but
it's maintained by the community and doesn't receive any formal updates or maintenance from the Ubuntu
developers at Canonical.
Then underneath that we can see a list called other packages that are related to this package and we
can see that we that they have required version numbers in these parentheses here.
So for example, this dpkg package must be greater than or equal to version 1.15.6.
And you can see that there's quite a few different packages that are related to this one.
And you can see that they have a special symbol at the front as well.
And we can see that red means that it depends on this package.
Okay.
So the red dot means that the zero aid package depends on these packages.
So that means in order to install zero aid, we need to install all of these packages with red dots
in front of them as well.
If we want zero aid to work.
But the red dot isn't the only symbol that can appear next to a package in the other packages list.
We can see that there are other symbols as well.
So you can see on the key up here that the green diamond next to a package means that zero ID would
recommend you to install another package.
So let's make this a bit more general.
Let's call the package that you want to install, which is our case zero.
And let's call that package a then let's call a random package in the other packages list package B
okay.
So if package A recommends package B, that means that in order for package A to function normally,
we should get package B, but package A will function without it.
Okay.
Then the blue square would say that package A suggested to us another package so recommends means that
it will function without it, but we recommend it for normal use.
Depends means it won't work if you don't get these packages.
Recommends means it will work but not not like how it should.
And the suggest package is just some entirely optional stuff that things you might like to check out.
And the final one is the enhances.
Now, anything with a black dot means that it enhances the current package in some way or another,
maybe through new features.
But again, it's not required.
Okay.
And if we scroll down to the bottom of this page, we can see the sizes, we can see what size the package
is to download, and we can see what size it is when it's uncompressed and installed.
And we can also see what, what the files each package contains, which is useful.
So you can click on there and you can see a list of each of the files that each package contains.
And you can see that there's different packages for different computer architectures.
So for example, if you've got a computer architecture that has an AMD 64 architecture, you can you
would download this one package.
And if you've got one for the three, eight, six computer architecture, you would download this package
and you can see your computer's architecture by opening up your terminal and typing you name Dash.
And we can see that in our virtual machine.
We have the we're running on an x 8664 architecture now amd 64 and x 8664 are the same.
So we would get the AMD 64 packages most appropriate for us here.
Now if you just get x 86, then then you download the 8386 package because that's probably the one most
most appropriate for your computer.
So now you might be thinking, wait a minute, Z, hold on, hold on, hold on.
Are you saying that in order to install software, I first have to search through thousands of packages,
then find out what dependencies it has.
And after that I must ensure that I download all of those different packages and satisfy their dependencies
and so on and so on.
But before I download all of those, I need to make sure that they're all the right version number and
that the packages are appropriate for my computer's architecture.
You have got to be kidding.
Well, that's what I'd be thinking anyway.
But no, the good news is that there's a command line tool installed on your computer that deals with
all of this stuff, and it's called your package manager.
Now, the actual program differs from distribution to distribution, but on a bundle the package manager
is called APT, spelt AP TT, which stands for Advanced Packaging Tool.
And this is what we're going to do use to do all this hard work for us and in the next video you're
going to see how to use it.
But first, let's have a review of what we've learned in this video.
So in this video, you've learned that a software repository is kind of like a library, but for software,
except you don't need to give the software back.
Now, it does differ for other distributions, but in a bundle there are four main software repositories.
So there's the main repository that contains free and open source software that is actively maintained
by the Ubuntu developers.
There's the universe repository that also contains free and open source software, but it's maintained
by the community.
Instead of the Ubuntu developers.
There's the restricted repository that contains proprietary software for device drivers and their software
in this repository is unlikely to be open source, although it might be, but it's not actively maintained
by the Ubuntu developers.
And finally there is the multiverse repository that has software that is limited by copyright or legal
issues.
Again, it's unlikely that the software will be open source in the multiverse repository, but it might
be now with your knowledge about free software, the new project and so on, you can now decide for
yourself whether you will only use free software from the main or universe repositories, whether you're
happy to use the software from the Restricted and multiverse repositories as well.
Ubuntu leaves that choice completely up to you.
Now, when we wanted to see a list of packages available to us, we headed over to packages ubuntu dot
com and a link for that is in the resources section in case you're interested.
And we saw all the packages were opened, were broken up by our distributions code name and you can
see the code name for your distribution by entering the LSB underscore release command with the a option.
And we saw that our command name was artful, but yours might be different depending upon when you downloaded
Ubuntu and when you watch this video.
Now all the packages are organized by a theme or sections and you can see a full list of packages by
scrolling down to the bottom of that page and clicking on the appropriate link.
And each package tells you what repository it comes from in square brackets next to its name.
But if there's no square brackets next to the name, then it comes from the main repository.
And when you click on a package, you'll find that you get more information about it, as well as information
about other packages that are related to it.
Now, some of these packages will be required for that package to run and these are marked with a red
dot and called they are the one packages said to depend upon these packages.
Some will be recommended packages and required for normal functioning and these will be indicated by
green diamonds.
Some will be suggested packages which are they're just for interest and indicated by blue squares.
And some will be called enhance that.
Some will enhance the packages functionality in some way and these will be indicated by black dots.
And finally, we discuss the due to the complexity of managing dependencies and ensuring software has
the correct version number and so on.
Software management is usually done using a program called a package manager.
Now package manager is differ from distribution to distribution, but on Ubuntu, the package manager
is called APT, which stands for Advanced Packaging Tool.
So in the next video you're going to learn how to use the advanced packaging tool to upgrade your system
and search for new software.
Now using a package manager is a critical piece of using a new Linux system, and luckily it's also
super easy.
So for incredible superpowers beyond your wildest dreams, I'll see you in the next video.