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
相关推荐
蚊子不吸吸1 分钟前
在Docker、KVM、K8S常见主要命令以及在Centos7.9中部署的关键步骤学习备存
linux·学习·docker·kubernetes·centos·k8s·kvm
Ven%6 分钟前
掌握Bash脚本编写:从服务启动脚本到语法精要
linux·服务器·开发语言·chrome·bash
运维小贺22 分钟前
华为和H3C服务器配置远控管理地址
运维·服务器·华为
三维频道34 分钟前
汽车前纵梁焊接总成与冲压件的高效自动化三维检测方案
运维·自动化·汽车·自动化三维检测·汽车前纵梁焊接总成·冲压件检测·高精度检测技术
rqtz1 小时前
【Linux-shell】探索Dialog 工具在 Shell 图形化编程中的高效范式重构
linux·运维·重构
行止62 小时前
LVS+Keepalived高可用群集
linux·lvs·keepalived
风清再凯2 小时前
docker基础入门于应用的实践
运维·docker·容器
未来并未来2 小时前
解锁微服务潜能:深入浅出 Nacos
运维·微服务·架构
风好衣轻3 小时前
【环境配置】在Ubuntu Server上安装5090 PyTorch环境
linux·pytorch·ubuntu