15

What is the format of the /etc/apt/sources.list file for Ubuntu?

As an example of the kind of information I am looking for, here is an explanation for Debian sources.list. However, the various sections, such as Distribution and Component, reference Debian releases; I am looking for Ubuntu specific information.

Enterprise
  • 12,792

2 Answers2

13

To more specifically answer the question about the format of sources.list, I suggest man 5 sources.list, which you can also view on the web as sources.list(5) [alt link], which is more detailed than Debian's SourcesList wiki article.

My specific inquiry related to how to specify multiple options, which is covered by sources.list(5) § The deb and deb-src types: options, which says they should be space-delimited, e.g.

deb [arch=amd64 signed-by=/usr/share/keyrings/some-repo.gpg] http://some.repo/apt dev main

This becomes more relevant with the recent apt-key deprecation that suggests using signed-by for all third-party repositories. This is coming soon: "apt-key(8) will last be available in Debian 11 [released 2021.08] and Ubuntu 22.04."

(The only Ubuntu-specific part should be the release and component names, which you can learn from the prior answer to this question.)

Adam Katz
  • 924
5

The format is exactly the same for Ubuntu.

You can get the Ubuntu distribution release names here. In sources.list use only the lowercased adjective part (precise, trusty, wily, etc.). Example:

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted

The components can be main, restricted, universe and multiverse.

More info: What's the difference between multiverse, universe, restricted and main?

Eric Carvalho
  • 55,453