【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

贰、参考

相关推荐
木子欢儿36 分钟前
openconnect Linux客户端安装 以及开机自启和登录
linux·运维·服务器
..Dauntless..1 小时前
【Linux】文件系统(一)
linux·运维·服务器
程序员-King.2 小时前
【ROS1】Noetic 开发工作流程与常用命令
c++·ubuntu·ros
GeW4 小时前
新质生产力路线图:从Linux到数据库,企业落地要点都在这
linux
IMPYLH4 小时前
Linux 系统备份与镜像
linux·服务器·网络
qetfw4 小时前
Bash 字符串处理:参数展开、序列与脚本执行方式
linux·开发语言·chrome·bash
hhwyqwqhhwy4 小时前
设备树之 provider 和 consumer
java·linux·前端
aaa最北边5 小时前
Linux 上的交叉编译
linux·运维·服务器
小张成长计划..5 小时前
【Linux】27:日志
linux·运维·服务器
别动我齐刘海5 小时前
机器人 C++ / 系统联调补强2——异常处理、Protobuf
linux·c++·人工智能·学习·算法·机器学习·机器人