【Ubuntu】Ubuntu 24 配置镜像源

【Ubuntu】Ubuntu 24 配置镜像源

零、起因

最近在虚拟机中安装了个ubuntu-24.04-desktop-amd64,默认是国外的软件源,很慢,故替换到国内。

壹、替换

源地址(阿里源)

https://developer.aliyun.com/mirror/ubuntu

软件源文件内容:

原位置(/etc/apt/sources.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

新位置(/etc/apt/sources.list.d/ubuntu.sources

复制代码
# 阿里云
Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

选择一种方式(新位置)写入到对应文件中去

更新

更新完软件源后即可使用更新后的镜像源~

更新软件源:

bash 复制代码
sudo apt-get update

更新软件(可选):

复制代码
sudo apt-get upgrade

贰、参考

相关推荐
晚风_END18 分钟前
Linux|操作系统|zfs文件系统的使用详解
linux·运维·服务器·数据库·postgresql·性能优化·宽度优先
暴力求解6 小时前
Linux---线程基础
linux·运维·服务器
JAVA面经实录9176 小时前
计算机基础(完整版·超详细可背诵)
java·linux·数据结构·算法
晚风_END6 小时前
Linux|操作系统|最新版openzfs编译记录
linux·运维·服务器·数据库·spring·中间件·个人开发
GanGanGanGan_6 小时前
Rocky Linux 9 + XFCE 编译安装 fcitx5 + Rime 教程
linux·centos
咖喱o7 小时前
QinQ/VLAN Stacking
linux·运维·服务器·网络
xiaoye-duck7 小时前
《Linux系统编程》Linux指令 (二):从零开始理解Linux基础指令
linux
月白风清江有声7 小时前
安装mingw 版 cmake
linux
呱呱巨基8 小时前
Linux 基础IO
linux·c++·笔记·学习
QFIUNE8 小时前
CD-HIT 详解:序列去冗余、安装使用与聚类结果解析
linux·服务器·机器学习·数据挖掘·conda·聚类