Linux Software Source (Learning Notes)

Keywords: Ubuntu sudo Linux

I. Basic Operation

Source change:

  • Note 1: There are spaces in the command, but they don't seem obvious.
  • Note the content guidance added in source. list:
    • http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8
    • What I am using now is Netease (Guangdong Guangzhou Telecom/Unicom Gigabit Dual-Line Access) http://mirrors.163.com/ubuntu/
      sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
      //Backup operations are selected on demand
      sudo gedit /etc/apt/sources.list
      //Use the system's owngeditTo operatesources.listfile->Adding Software Sources
      sudo apt-get update
      //Update Source

Reference resources:

  1. Configure the update source of apt-get for Linux
  2. Detailed description of apt-get command under Ubuntu

II. Summary of Questions

My problem is when the Linux software source is set up.
  1. Software source format, details.
  2. Necessity of selective annotations in software sources, details.
  3. What is software source and how to use it?

3. Explore the format of software source, details.

Let's start with software sources:

deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##Beta source
deb http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Source code
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
##Beta source
deb-src http://cn.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical Partners and Additions
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
My first thought to really see this repetition is: Why not create a global variable, or why shrub so many times when you know the format is the same? Anyway, I'm not comfortable seeing so many repetitions. Regardless of my point of view, let's first understand the format of the underlying source.    What we see is something like this.

De url Ubuntu version code (possibly suffixed) main restricted universe multiverse
Let's introduce the contents of a line in a backward-forward order.

3.1,main restricted universe multiverse

  • Qualifiers are classified according to the degree of freedom of the software.
    • main: Complete free software.
    • restricted: Incomplete free software.
    • universe:ubuntu does not officially provide support and patches. It relies solely on community support.
    • muitiverse: Non-free software, no support or patches at all.
    • The layout is clearer:
  • Of course, there is another word: partner, which is not yet understood.

3.2, Ubuntu version number

  1. xenial
  2. xenial-security
  3. xenial-updates
  4. xenial-backports
  5. xenial-proposed

The problem is that there are suffixes after the version number. Any difference?

I haven't found the official answer to this question, but I believe the answer still exists, but I'm not foolish enough to find it. At present, I support the view that:

  • Security - Important Security Updates. (Security update)
  • Updates - Recommended Updates. (Recommended Updates)
  • Proposed - Pre-released Updates.
  • Backports - Unsupported Updates. (Updates without subsequent support)

I haven't figured out how to use these parameters.

3.3,URL

What the URL itself has nothing to say is a server address, the address where the system downloads the content.
The real problem is that this address is repeated many times in the configuration information, which I can't understand.

3.4,ded/ded-src

There is another problem involved here, that is, several forms of software installation packages in Ununtu.
Software packages downloa ded from the url at the beginning of De are compiled binary codes that can be installed directly.
The software installation package downloaded from the url headed by ed-src is the source package, which needs to be compiled and installed before installation.

Reference resources

  1. Writing Format of Source Address Source. List and Various dabian Sources
  2. Format description of debian software source.list file
  3. What does main restricted universe multiverse mean?
  4. What's the difference between main, restricted, universe and multiverse?
  5. The meaning of backports proposed security updates in the source (resolved)
  6. Summary of sources.list for ubuntu

Posted by javamint on Sun, 07 Jul 2019 11:42:39 -0700