Debian and Ubuntu installation source configuration file description

The main source list file /etc/apt/sources.list, also takes /etc/apt/sources.list.d/*, and the result is in union theory.
The source list file is in line units, each line is divided into multiple fields, and the fields are separated by blanks. The pound sign (#) starts with a comment line. The sample is as follows:

Sample installation source configuration (Debian 8 jessie):

deb http://ftp.tw.debian.org/debian/ jessie main contrib non-free
deb http://ftp.tw.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.tw.debian.org/debian/ jessie-backports main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.yzu.edu.tw/Linux/debian-multimedia/ jessie main non-free

# deb http://ftp.cn.debian.org/debian/ jessie main contrib non-free
# deb http://ftp.cn.debian.org/debian/ jessie-updates main contrib non-free
# deb http://ftp.cn.debian.org/debian/ jessie-backports main contrib non-free
# deb http://ftp.cn.debian.org/debian-security/ jessie/updates main contrib non-free
# deb http://ftp.cn.debian.org/debian-multimedia/ jessie main non-free

Description of each field

The first field indicates the packet type. The value is only "deb" and "deb-src", which correspond to binary packages and source code packages respectively. Usually only binary packages are useful.

The second field indicates the mirror site, that is, "source"!
The URL locates to a directory, and there must be two subdirectories "dists" and "pool" under the directory. Such as: http://ftp.cn.debian.org/debian/, http://ftp.sjtu.edu.cn/ubuntu/.

( adsbygoogle = window.adsbygoogle || []).push({});

The third field indicates the "version type" of the package, tentatively called "warehouse".
Open a source and enter the "dists" subdirectory to see which warehouses are in the source, that is, the subdirectories under it.
The naming format is "system release name-repository name", such as "jessie-backports" "stretch-updates" of Debian, and "vivid-updates" "wily-proposed" of Ubuntu. The one without a warehouse name is the main warehouse.
Debian's stable and testing are links to specific system releases, which will change over time. For example, the current stable is jessie, so stable-backports and jessie-backports are equivalent. But I do not suggest using stable and testing, because after the next stable is released, your source will automatically point to a new version, but you have not read the release notes of the new version and are not ready to upgrade.

The Debian repository is basically the same as Ubuntu since squeeze. In addition to the main warehouse, there are:
"Security", Ubuntu is used to refer to security updates. That is, bug fixes that affect system security. Debian is a bit special, see below.
"Updates", non-security updates. That is, bug fixes that do not affect system security.
"Proposed-updates", pre-update. Small beta version. After that, it will enter "updates" or "security". Ubuntu only uses "proposed" without the suffix "updates".
"Backports", backup. After Debian stable is released, after a certain version of Ubuntu is officially released, all its software version numbers have been frozen, and all software only fixes bugs and does not add any features. But some people may need new features, or even some newer software does not have it at all. The warehouse was set up for this reason, but it owes official maintenance, and the content may not be available until some time after the system is officially released. This warehouse is in the second priority order, and the above-mentioned warehouses are in the first priority order. The packages in the second priority order must be specifically specified to install, see the --target-release option of apt-get(8) aptitude(8).
Tip: Not all versions have all the above repositories, please open the dists directory in the source to view.

The subsequent field indicates the type of package license.
The subsequent fields are ranked in no particular order, and the final result is the union. Divided by the license of the package itself and the license of the directly dependent package. Open a warehouse, you can see several subdirectories.
Debian has up to three
"Main" itself is free software, and all dependent packages are also free software. This type of software can be called pure free software, see https://www.debian.org/distrib/packages "Debian Free Software Guidelines".
"Contrib" itself is free software, but the dependencies are not pure, that is, there is at least one instance of contrib or non-free in the dependencies.
"Non-free" is not free software itself, regardless of dependencies. Of course, the software is free to use or try. One free case https://packages.debian.org/jessie/unrar, one trial https://packages.debian.org/jessie/rar for xx days.

Ubuntu has up to four
"Main", officially maintained free software.
"Universe", free software maintained by the community.
"Restricted", device-specific driver.
"Multiverse" is the same as Debian's "non-free".
Some alternative third-party sources may not follow the above conventions. In short, open the warehouse catalog and see for yourself.

Special features:

Debian security updates
Unlike Ubuntu, which is placed in the "security" repository, it is placed in a separate source. Major mirror sites usually put general packages in the "debian" directory one level down from the root, and security updates will be put in the "debian-security" directory, if available, such as http://ftp.cn.debian.org/debian-security/.

Debian officially recommends that all security updates are only updated from the official main site. Do not use other mirror sites unless you are very confident in the mirror site, see https://www.debian.org/security/index.en.html. Therefore, many mirror sites do not provide security update sources.
The form of the third field of security update is fixed as "version name/updates", such as "wheezy/updates" and "jessie/updates".

Debian multimedia source
Some multimedia software involves copyright issues, including hardware decoders, which are not officially included in Debian. There is a website dedicated to filling the vacancy, see http://www.deb-multimedia.org.

Last advice: don't enable multiple sources at the same time, just enable one source from the same warehouse, otherwise it will easily cause confusion. The following example lists multiple sets but only activates one set.

Recommended Posts

Debian and Ubuntu installation source configuration file description
Ubuntu configuration source and installation software
Ubuntu16.04 installation and simple configuration
Ubuntu PostgreSQL installation and configuration
Ubuntu 19.1 installation and configuration Chinese environment
Configuration and beautification after Ubuntu installation (1)
Nginx installation and configuration load (ubuntu12.04)
DLNA/UPnP Server installation and configuration under Ubuntu 12.04
OpenMPI-Ubuntu installation and configuration
Virtual machine installation and configuration ubuntu shared folder_
Ubuntu introduction and installation
Kaldi installation and configuration graphic tutorials under Ubuntu
Basic configuration and common software installation after ubuntu 18.04 installation
Installation, configuration and uninstallation of GitLab in Ubuntu19.1
Ubuntu16.04 mirror complete installation and configuration tutorial under VMware
Ubuntu12 step-by-step installation and configuration (system, FTP, TELNET.. settings)
Common exceptions and solutions for Ubuntu system installation and configuration
Centos7 installation and configuration prometheus
CentOS 7 installation and configuration PPTP
CentOS installation and configuration cmake
Centos7.5 installation and configuration MongoDB4.0.4
CentOS 7 installation and configuration PPTP
Ubuntu16.04 install SVN and configuration
Centos7 installation and configuration of Jenkins
Ubuntu environment variables and ADB configuration
Centos7 hadoop cluster installation and configuration
Ubuntu16.04 configuration OpenCV3.4.2 and basic use
Redis installation under ubuntu and windows
Java-JDK installation and configuration under CentOS
CentOS 7 Tomcat service installation and configuration
CentOS NTP server installation and configuration
Ubuntu18.04 installation Anaconda3 and VSCode guide
Centos7 mysql database installation and configuration
Detailed explanation of quick installation and configuration of Subversion (SVN) under Ubuntu
CentOS 7 system installation and configuration graphic tutorial
ubuntu Docker installation and deployment of Rancher
Ubuntu installation and deployment Redash operation notes (2020.08)
Tomcat installation and configuration under CentOS 7 (Tomcat startup)
MySQL 8.0 installation, deployment and configuration under CentOS 6/7
Ubuntu18.04 system installation and prerequisite software installation guide
Installation and configuration of redis under centos7
Installation and uninstallation of CUDA under Ubuntu 16.04
Ubuntu18.04 Server version installation and use (graphic)
Installation and deployment of Nginx in Ubuntu
Installation and use of Win10 subsystem Ubuntu
Ubuntu 18.04 source code compile and install ffmpeg4.1
Ubuntu install PHP and PHP Nginx configuration method
Centos7 hive stand-alone mode installation and configuration
Ubuntu 14.04 16.04 Linux nvidia driver download and installation
Installation and configuration of JDK in CentOS 7 system
CentOS 6.5 system installation and configuration graphic tutorial (detailed graphic)
Installation of pulseaudio and API usage under Ubuntu 12.04
The basic configuration and interface beautification of Ubuntu
CentOS 7 installation and configuration graphic tutorials under VMware10
Installation and configuration of rsync server under CentOS 6.5
Installation and configuration of CentOS 7 in VMware Workstation
Technical corner | Windows 10/7 and Ubuntu 18.04 dual system installation
MySQL 8.0 installation, deployment and configuration tutorial on CentOS 8
Installation and use of SSH in Ubuntu environment
ubuntu 18.04 early configuration
UBUNTU 16.04 installation diary