1

I was looking at the instructions to download the i3 tiling wm. The instructions say

If you are running Ubuntu, it is strongly suggested to use a package manager like aptitude or synaptic to download and install packages, instead of doing so manually via this website.

You should be able to use any of the listed mirrors by adding a line to your /etc/apt/sources.list like this:

deb http://cz.archive.ubuntu.com/ubuntu bionic main universe 

I installed Ubuntu 18.04 only recently and have not made any changes to my sources.list file and understand what the terms main, restricted, universe, and multiverse mean based on this question. I am unable to determine whether I need to add the line deb http://ca.archive.ubuntu.com/ubuntu bionic main universe to my sources.list file. It contains the following lines, among others:

deb http://ca.archive.ubuntu.com/ubuntu/ bionic universe

deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

Do these lines already point to all the components/packages that are universe and main (and restricted), meaning that I do not have to add the line mentioned above that specifically points to main universe?

3 Answers3

1

You might need to make minor changes.

Let's look at that line more closely:

deb http://cz.archive.ubuntu.com/ubuntu bionic main universe 

deb      -- Binary packages (instead of source packages, which are very different)
http://cz.archive.ubuntu.com/ubuntu  -- An Ubuntu mirror. Any Ubuntu mirror worldwide will also work
bionic   -- Repository (base 18.04, not updates, not security patches)
main     -- A pocket within the Ubuntu repository. Canonical-supported, open-source software that is a component of the base install of Ubuntu lives in 'main'
universe -- A different pocket within the Ubuntu repository. Optional, open-source, community-supported software lives in 'universe'

For more information about the repository structure, see https://help.ubuntu.com/community/Repositories/Ubuntu


You can stack multiple pockets on a single line. Or not, as you like. So if we wanted, we could write that line two different ways:

deb http://cz.archive.ubuntu.com/ubuntu bionic main universe 

or

deb http://cz.archive.ubuntu.com/ubuntu bionic main
deb http://cz.archive.ubuntu.com/ubuntu bionic universe 




Now let's apply our new knowledge to your existing sources:

deb http://ca.archive.ubuntu.com/ubuntu/ bionic universe
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
  • You already have a .ca mirror, which is just as good as the .cz mirror. The best mirror is the one that works reliably for you. You don't need to change that.
  • You have two different repositories (bionic and bionic-updates), each with different pockets. That gets confusing. Each repository should have similar pockets. Write your sources so they are clear to both the system and to you.

Consider tweaking to something more like:

deb http://ca.archive.ubuntu.com/ubuntu/ bionic main universe restricted
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main universe restricted
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-security main universe restricted

or

deb http://ca.archive.ubuntu.com/ubuntu/ bionic main
deb http://ca.archive.ubuntu.com/ubuntu/ bionic universe
deb http://ca.archive.ubuntu.com/ubuntu/ bionic restricted
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates restricted
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-security main
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-security universe 
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-security restricted 

Any of these meets the i3 instructions.

user535733
  • 62,253
  • That was a very helpful comment! A minor clarification though. If I were to make either one of the above mentioned tweaks and add the relevant repository entries for multiverse, I'd theoretically be set for all possible downloadable packages? – Anonymouse May 20 '19 at 17:40
  • @Anonymouse 'multiverse' is the only other pocket, and commonly used. There are other repositories: bionic-backports and bionic-proposed...however, I don't recommend either for daily consumption. There's also Canonical Partners, but that's kind of outside the scope of your question. – user535733 May 20 '19 at 18:04
0

This is mine:

deb mirror://mirrors.ubuntu.com/mirrors.txt bionic main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main restricted universe multiverse

Notice I replace URLs with: mirror://mirrors.ubuntu.com/mirrors.txt

Note this will not work for do-release-upgrade in my experience, but works well for everything else.

vvvvv
  • 608
gs007
  • 11
0

When Ubuntu is installed, it automatically choose best mirror near you so that you can get updates at a faster data transmission rate. cz is the mirror of Czech Republic while ca denotes Canadian mirror.

You don't really need to add those lines unless you're facing some issues connecting to Canadian mirror.

Repositories are usually in format of:

URI/ distribution components

As of now you have main, universe and restricted enabled which means you'll get support/updates for the packages which are supported by Ubuntu's official repositories under its respective component type.

Also, be cautious while editing sources.list unless you know what you are doing. A little mistake in sources.list can further leads to many errors. You can always choose your preferred mirror from Software and Updates app.

Kulfy
  • 17,696
  • Thank you for your comment. I am not having any issues connecting to the Canadian mirror. I wish to know whether the lines deb http://ca.archive.ubuntu.com/ubuntu/ bionic universe and deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted mean that all universe and main packages are covered/pointed to. – Anonymouse May 20 '19 at 16:41