【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

贰、参考

相关推荐
迎風吹頭髮40 分钟前
Linux内核架构浅谈2- Linux内核与硬件交互的底层逻辑:硬件抽象层的作用
linux·架构·交互
~光~~1 小时前
【环境配置 】WSL2 +ubuntu20.04 +Qt配置+Kits配置
开发语言·qt·ubuntu
孙同学要努力2 小时前
《Linux篇》进程状态——浅度、深度睡眠状态、僵尸状态、运行状态
linux·运维
jieyu11192 小时前
Linux Rootkit 详解
linux·运维·系统安全
宁檬精2 小时前
运维面试准备——综合篇(一)
linux·运维·服务器
洛阳纸贵Coco.Leo.YI3 小时前
10分钟在Windows11下Ubuntu内安装docker-Version28.51
linux·ubuntu·docker
阿巴~阿巴~3 小时前
Ubuntu 20.04 安装 Redis
linux·服务器·数据库·redis·ubuntu
aitav03 小时前
⚡ arm 32位嵌入式 Linux 系统移植 NTP 服务
linux·arm开发·ntp
爱奥尼欧3 小时前
【Linux笔记】网络部分——socket 编程 TCP实现多台虚拟机使用指令访问云服务器
linux·服务器·网络
yolo_guo3 小时前
sqlite 使用: 03-问题记录:在使用 sqlite3_bind_text 中设置 SQLITE_STATIC 参数时,处理不当造成的字符乱码
linux·c++·sqlite