【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

贰、参考

相关推荐
z202305085 分钟前
RDMA之DCQCN (14)
linux·服务器·网络·人工智能·ai
zh路西法8 分钟前
【ROS2相机标定】基于棋盘格的单目标定法
linux·c++
用户23678298016815 分钟前
Linux killall 命令详解:按进程名批量终止进程的原理与实践
linux
无限进步_17 分钟前
【Linux】进度条:行缓冲区、\r 与 fflush 的实战
linux·服务器·开发语言·数据结构·后端
say_fall25 分钟前
Linux进程核心概念:命令行参数与环境变量深度解析
linux·运维·服务器·ubuntu
go不是csgo25 分钟前
Go-GMP-调度器深度解析(改进版本)
java·linux·golang
Peace27 分钟前
【Zabbix】
linux·运维·zabbix
木卫二号Coding1 小时前
第八十五篇-CentOS-7 + Tesla V100 环境下 Docker 容器内编译部署 Qwen3.6-27B-MTP 大模型实战指南
linux·docker·centos
dongdonglele5211 小时前
ubuntu 系统x86 架构安装docker,可以使用本地显卡
ubuntu·docker·架构
无限进步_1 小时前
【Linux】GDB 调试:定位问题的利器
linux·运维·服务器