Let's talk about package repositories first. I want you to better understand where software is coming from when you install it.
The below diagram shows three networks: your network, with your servers in insides it; a network owned by the creators and maintainers of Ubuntu, "Canonical"; and a third party vendor's network.
The Canonical and vendor's networks have "apt repositories" inside of them. These repositories contain software that you can install on your local system, provided it's configured to use a remote repository. With Ubuntu, you get the Canonical repositories configured on your server automatically. You don't have to do any work there.
For a third-party vendor, you'll have to add their repository to your system before you can add packages from their repository to your local systems. We'll look at that later.
Our Default Repositories#
Let's look at what our Ubuntu server comes with by default, in terms of repositories (I'm running this has
superman, you can use your original user or
superman, it's upto you):
1 2 3 4 5 6 7 8 9 10 11
You should Google for the
grep command and learn how-to use it. It's very powerful. I won't go into detail on it here now, but future updates to the book will include useful tools like
grep. All you need to know today is it's searching inside the file for the patterns we've given it -
^deb - and then printing the lines (in full) that it finds match those patterns.
I see ten repositories in total. Let's break down a line from the file:
This breaks down into this.
This is added to the output by
grep and isn't actually inside the file. It's
grep's way of telling us where it found the pattern.
This is the repository type. A
deb file is a Debian software package. Debian is another Linux distribution, and the distribution that Ubuntu was original based off of.
A software package contains all the files, scripts, and more, that are needed to install a specific piece of software. Software can be quite complex and require a lot of files to operate.
This is the remote location of the repository. You can see it's located on the
ubuntu.com domain. This address is essentially where the
apt tools (we'll cover these later) go to find packages, download them, and install them.
focal main restricted#
focal part if the version of Ubuntu we're running - the "distribution". It's called "Focal". Ubuntu releases (distributions) are given names, and we're running the Focal release.
restricted are the repositories we want to access and pull packages from. There are four primary repositories Ubuntu uses:
main- Canonical-supported free and open-source software.
universe- Community-maintained free and open-source software.
restricted- Proprietary drivers for devices.
multiverse- Software restricted by copyright or legal issues.
There are others, too. We won't go over them all.