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
相关推荐
Xの哲學1 小时前
Linux流量控制: 内核队列的深度剖析
linux·服务器·算法·架构·边缘计算
tuokuac1 小时前
docker中nginx配置报错解决
linux·运维·服务器
Zeku2 小时前
20251129 - 详细解析Linux的mmap(内存映射)
linux·驱动开发·嵌入式软件·linux应用开发
Joren的学习记录3 小时前
【Linux运维大神系列】docker详解(四)
linux·运维·docker
老王熬夜敲代码3 小时前
网络中数据传输的具体过程
linux·网络·笔记
Elastic 中国社区官方博客4 小时前
让我们把这个 expense 工具从 n8n 迁移到 Elastic One Workflow
大数据·运维·elasticsearch·搜索引擎·ai·信息可视化·全文检索
世转神风-4 小时前
linux使用终端打开当前文件夹界面
linux
( •̀∀•́ )9204 小时前
GitHub Actions SSH 部署密钥
运维·ssh·github
louqle4 小时前
docker基本知识及常用命令汇总
运维·docker·容器
刘某的Cloud5 小时前
列表、元组、字典、集合-组合数据类型
linux·开发语言·python