如何配置Ubuntu国内APT安装源?

Debian-Like

1 前言

一个问题,一篇文章,一出故事。
本章将解决Ubuntu系统从国内源安装或者更新的问题。

2 最佳实践

2.1 创建国内源配置

cp /etc/apt/sources.list.d/ubuntu.list /etc/apt/sources.list.d/ubuntu.list.save
vim /etc/apt/sources.list.d/ubuntu.list

加入如下配置,

deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse

2.2 更新源配置

apt update

参阅文档
================
https://developer.aliyun.com/mirror/ubuntu/

没有评论

发表回复

Debian-Like
如何让VMware显示虚拟机IP地址?

1 前言 一个问题,一篇文章,一出故事。 笔者今天安装了Ubuntu 24.04.4版本的系统,使用 …

Debian-Like
如何设置Ubuntu临时IP地址?

1 前言 一个问题,一篇文章,一出故事。 笔者今天安装了Ubuntu 24.04.4版本的系统,使用 …

Debian-Like
如何安装部署Ubuntu mqttx图形版?

1 前言 一个问题,一篇文章,一出故事。 笔者今天部署EMQX服务端,因为需要mqtt的客户端来测试 …