【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

贰、参考

相关推荐
星恒随风1 小时前
从0实现C++ AI大模型接入SDK(十):DataManager业务实现——数据库CRUD、事务管理与数据一致性
linux·服务器·jvm·数据库·c++
qetfw1 小时前
Debian 部署 Discuz!:运行环境、数据库与安装验收
linux·运维·数据库·debian
心之王者71612 小时前
【Linux】多线程:从线程控制、同步互斥到经典并发模型
linux·运维·服务器
Doctor_Strange_DML12 小时前
图像编辑模型服务部署过程记录
linux·缓存·docker·ai
笔记本note16 小时前
Linux 文件系统与设备文件
linux·服务器·文件系统
无足鸟ICT17 小时前
【RHCA+】_proc_pid_cmdline
linux·运维·服务器
学以智用18 小时前
CentOS Linux 文件操作详解
linux
饿了吃洗衣凝珠18 小时前
shell循环
linux·运维·服务器
代码不停19 小时前
Linux基础知识
java·linux·数据库
东风微鸣20 小时前
Linux台式机也能指纹识别登录验证啦
linux·指纹