MirrorZ Help

Ubuntu 软件仓库镜像使用帮助

选择镜像

本镜像仅包含 32/64 位 x86 架构处理器的软件包,在 ARM(arm64, armhf)、PowerPC(ppc64el)、RISC-V(riscv64) 和 S390x 等架构的设备上(对应官方源为 ports.ubuntu.com)请使用 ubuntu-ports 镜像

对于 Ubuntu 不再支持的版本,请参考 Ubuntu 旧版本帮助

在 Ubuntu 24.04 之前,Ubuntu 的软件源配置文件使用传统的 One-Line-Style,路径为 /etc/apt/sources.list;从 Ubuntu 24.04 开始,Ubuntu 的软件源配置文件变更为 DEB822 格式,路径为 /etc/apt/sources.list.d/ubuntu.sources

将系统自带的对应文件做个备份,然后根据格式的选择下面对应的内容替换,即可使用选择的软件源镜像。

传统格式(/etc/apt/sources.list):

Ubuntu 版本
使用官方安全更新软件源
启用 proposed
启用源码镜像
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://(Loading...)/ noble main restricted universe multiverse
# deb-src https://(Loading...)/ noble main restricted universe multiverse
deb https://(Loading...)/ noble-updates main restricted universe multiverse
# deb-src https://(Loading...)/ noble-updates main restricted universe multiverse
deb https://(Loading...)/ noble-backports main restricted universe multiverse
# deb-src https://(Loading...)/ noble-backports main restricted universe multiverse

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
# deb https://(Loading...)/ noble-security main restricted universe multiverse
# # deb-src https://(Loading...)/ noble-security main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://(Loading...)/ noble-proposed main restricted universe multiverse
# # deb-src https://(Loading...)/ noble-proposed main restricted universe multiverse

DEB822 格式(/etc/apt/sources.list.d/ubuntu.sources):

Ubuntu 版本
使用官方安全更新软件源
启用 proposed
启用源码镜像
Types: deb
URIs: https://(Loading...)
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
# Types: deb-src
# URIs: https://(Loading...)
# Suites: noble noble-updates noble-backports
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
# Types: deb
# URIs: https://(Loading...)
# Suites: noble-security
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# # Types: deb-src
# # URIs: https://(Loading...)
# # Suites: noble-security
# # Components: main restricted universe multiverse
# # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# Types: deb-src
# URIs: http://security.ubuntu.com/ubuntu/
# Suites: noble-security
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# 预发布软件源,不建议启用
# Types: deb
# URIs: https://(Loading...)
# Suites: noble-proposed
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# # Types: deb-src
# # URIs: https://(Loading...)
# # Suites: noble-proposed
# # Components: main restricted universe multiverse
# # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

因镜像站同步有延迟,可能会导致生产环境系统不能及时检查、安装上最新的安全更新,不建议替换 security 源。

这个页面的内容有问题?在 GitHub Issue 反馈

想完善这个页面?查看我们的贡献指南在 GitHub 上查看此页的源代码

本页面的全部内容在 CC BY-NC-SA 4.0 协议之条款下提供,附加条款亦可能应用。