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
相关推荐
wdxylb4 小时前
云原生俱乐部-shell知识点归纳(1)
linux·云原生
飞雪20075 小时前
Alibaba Cloud Linux 3 在 Apple M 芯片 Mac 的 VMware Fusion 上部署的完整密码重置教程(二)
linux·macos·阿里云·vmware·虚拟机·aliyun·alibaba cloud
路溪非溪6 小时前
关于Linux内核中头文件问题相关总结
linux
木易双人青6 小时前
01-Docker-简介、安装与使用
运维·docker·容器
专注API从业者7 小时前
Python + 淘宝 API 开发:自动化采集商品数据的完整流程
大数据·运维·前端·数据挖掘·自动化
Lovyk8 小时前
Linux 正则表达式
linux·运维
Fireworkitte9 小时前
Ubuntu、CentOS、AlmaLinux 9.5的 rc.local实现 开机启动
linux·ubuntu·centos
sword devil90010 小时前
ubuntu常见问题汇总
linux·ubuntu
ac.char10 小时前
在CentOS系统中查询已删除但仍占用磁盘空间的文件
linux·运维·centos
中科米堆11 小时前
中科米堆CASAIM自动化三维测量设备测量汽车壳体直径尺寸
运维·自动化·汽车·视觉检测