# /etc/apt/sources.list (ubuntu 22.04) # 语法:deb [options] URI Suite Component... # URL 支持本地URL,形如 `file:///mnt/repo` deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted deb http://ports.ubuntu.com/ubuntu-ports/ jammy universe deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates universe deb http://ports.ubuntu.com/ubuntu-ports/ jammy multiverse deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates multiverse deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security universe deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security multiverse
Suite
含义
focal
发布时的原始版本,基本不动
focal-updates
发布后的 bug 修复更新(稳定后推送)
focal-security
安全漏洞修复,优先级最高、最快推送
focal-backports
从更新版 Ubuntu 移植回来的新版本软件,可选
Component
维护者
License
main
Canonical 官方维护
全开源
restricted
Canonical 官方维护
部分闭源(如 GPU 驱动)
universe
社区维护
全开源,但官方不保证
multiverse
社区维护
有版权限制的软件
3.2 DEB822 格式
DEB822 格式 更加清晰,变成了键值对的形式.
1 2 3 4 5 6 7 8 9 10 11
# /etc/apt/sources.list.d/ubuntu.sources (ubuntu 24.04) Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble noble-updates noble-backports Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Types: deb URIs: http://ports.ubuntu.com/ubuntu-ports/ Suites: noble-security Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg