Ubuntu 软件仓库镜像使用帮助

选择镜像

CERNET - 校园网联合镜像站(mirrorz-302 智能选择)TUNA - 清华大学开源软件镜像站BFSU - 北京外国语大学开源软件镜像站BJTU - 北京交通大学自由与开源软件镜像站CQU - 重庆大学开源软件镜像站NJU - 南京大学开源镜像站DNUI - 大连东软信息学院开源镜像站PKU - 北京大学开源镜像站XJTU - 西安交通大学软件镜像站NJTech - 南京工业大学开源软件镜像站ShanghaiTech GeekPie - 上海科技大学 GeekPie 开源镜像站QLUT - 齐鲁工业大学开源软件镜像站NYIST - 南阳理工学院开源软件镜像站JCUT - 荆楚理工学院开源镜像站NWAFU - Mirrors@NWAFUUSTC - 中国科学技术大学开源软件镜像SJTUG - Siyuan - SJTUG 思源镜像站SUSTech CRA - 南方科技大学开源软件镜像站ISRC-ISCAS - ISCAS 镜像站ZJU - 浙江大学开源软件镜像站SDU - 山东大学镜像站SCAU - 华南农业大学开源软件镜像站UESTC LUG - 电子科技大学镜像站LZUOSS - 兰州大学开源社区镜像站JLU - 吉林大学开源镜像站CQUPT - 重庆邮电大学开源镜像站

是否启用 HTTPS

是否使用 sudo

本镜像仅包含 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 版本

24.04 LTS23.1023.0422.04 LTS20.04 LTS18.04 LTS16.04 LTS14.04 LTS

使用官方安全更新软件源

是否

启用 proposed

否是

启用源码镜像

否是

/etc/apt/sources.list快速配置

复制代码
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.cernet.edu.cn/ubuntu/ jammy main restricted universe multiverse
# deb-src https://mirrors.cernet.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.cernet.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.cernet.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.cernet.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.cernet.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse

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

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

# 预发布软件源,不建议启用
# deb https://mirrors.cernet.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
# # deb-src https://mirrors.cernet.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
DEB822 格式(/etc/apt/sources.list.d/ubuntu.sources):

Ubuntu 版本

24.04 LTS

使用官方安全更新软件源

是否

启用 proposed

否是

启用源码镜像

否是

/etc/apt/sources.list.d/ubuntu.sources快速配置

复制代码
Types: deb
URIs: https://mirrors.cernet.edu.cn/ubuntu
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://mirrors.cernet.edu.cn/ubuntu
# Suites: noble noble-updates noble-backports
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

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

# # Types: deb-src
# # URIs: https://mirrors.cernet.edu.cn/ubuntu
# # 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://mirrors.cernet.edu.cn/ubuntu
# Suites: noble-proposed
# Components: main restricted universe multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# # Types: deb-src
# # URIs: https://mirrors.cernet.edu.cn/ubuntu
# # Suites: noble-proposed
# # Components: main restricted universe multiverse
# # Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

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

相关推荐
Johny_Zhao12 分钟前
MySQL 高可用集群搭建部署
linux·人工智能·mysql·信息安全·云计算·shell·yum源·系统运维·itsm
FREEDOM_X42 分钟前
ubuntu20.04 远程桌面Xrdp方式
ubuntu·vmware
珹洺1 小时前
Linux操作系统从入门到实战(三)Linux基础指令(上)
linux·运维·服务器
再睡一夏就好1 小时前
Linux常见工具如yum、vim、gcc、gdb的基本使用,以及编译过程和动静态链接的区别
linux·服务器·c语言·c++·笔记
꧁坚持很酷꧂1 小时前
配置Ubuntu18.04中的Qt Creator为中文(图文详解)
开发语言·qt·ubuntu
归寻太乙2 小时前
Linux环境变量
linux·运维·服务器
Sapphire~2 小时前
Linux-06 ubuntu 系统截图软件使用简单记录
linux·运维·ubuntu
難釋懷2 小时前
Shell脚本-while循环语法结构
linux·运维·服务器·bash
B64A-消闲2 小时前
shell命令一
linux·运维
biter00883 小时前
ubuntu(28):ubuntu系统多版本conda和多版本cuda共存
linux·人工智能·ubuntu·conda