Source.list写法
时间: 2023-09-02 14:13:32 浏览: 89
sources.list
Source.list是Ubuntu系统中APT软件包管理器的配置文件,用于指定软件包下载的源。它的写法如下:
```
deb http://archive.ubuntu.com/ubuntu/ codename main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ codename main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ codename-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ codename-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ codename-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ codename-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ codename-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ codename-security main restricted universe multiverse
```
其中,codename是Ubuntu系统的版本代号,如Ubuntu 20.04的版本代号是focal。main、restricted、universe和multiverse是Ubuntu软件包的四个组件,分别表示主要软件、受限制的软件、非免费软件和不常用的软件。deb和deb-src分别表示二进制软件包和源代码包的下载地址。在实际使用时,需要将codename替换成当前系统的版本代号。
阅读全文