【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

贰、参考

相关推荐
m0_6948455715 小时前
music-website 是什么?前后端分离音乐网站部署实战
linux·运维·服务器·云计算·github
you-_ling15 小时前
Linux软件编程:Shell命令
java·linux·服务器
FairGuard手游加固15 小时前
面具外挂检测方案
linux·运维·服务器
鲨辣椒1008615 小时前
Linux软件编程基石——基础指令使用
linux·windows·microsoft
熬夜有啥好15 小时前
Linux软件编程——Shell命令
linux·运维·服务器
一只自律的鸡15 小时前
【Linux驱动】环境搭建和开发板操作 下篇
linux·运维·服务器
模型时代15 小时前
Linux系统安全革命:Amutable公司推出全新验证完整性技术
linux·运维·系统安全
醇氧15 小时前
【Linux】centos 防火墙学习
linux·学习·centos
~光~~15 小时前
【嵌入式linux学习】06_中断子系统
linux·单片机·学习
LYS_061815 小时前
寒假学习(14)(HAL库5)
java·linux·学习