ubuntu 22.04 更换阿里源 (wsl2 参照)

步骤 1: 备份当前源列表

复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

步骤 2: 编辑源列表文件

复制代码
sudo nano /etc/apt/sources.list

步骤 3: 添加阿里云镜像源

ubuntu 阿里源地址可以在这查看

ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站

打开页面下拉找到 ubuntu 22.04 LTS 版本源地址

复制代码
deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

步骤 4: 更新软件包列表

复制代码
sudo apt update
sudo apt upgrade
相关推荐
画中有画3 小时前
使用yolov8实现自动化脚本
运维·yolo·自动化
Piko6145 小时前
H3C IRF2 堆叠实战:打造高可靠核心交换网络
运维·网络·笔记
JAVA面经实录9175 小时前
Linux 常用命令完整知识体系
java·linux·开发语言·汇编
万联WANFLOW8 小时前
SD-WAN 控制平面高可用怎么做?SDWAN 控制器挂了,全网会发生什么
运维·网络·分布式·架构
SkyWalking中文站10 小时前
认识 Horizon UI · AI Assistant:用日常语言查询你的可观测性数据
运维·监控·自动化运维
艾莉丝努力练剑11 小时前
OpenCode AI 编程:Ubuntu 24.04 环境安装与使用指南
linux·服务器·网络·人工智能·tcp/ip·ubuntu
崇山峻岭之间11 小时前
Keil5输出hex转换为bin的设置
linux·运维·服务器
Hoxy.R11 小时前
KingbaseES读写分离高可用集群扩容、备库重建与故障切换实战
运维·数据库
谷雪_65812 小时前
Linux 网络命名空间:从内核原理到企业级容器网络架构全景实战
linux·网络·架构
Tian_Hang12 小时前
Eclipse Ditto 的权限策略
java·服务器·前端·网络·ide·ubuntu·eclipse