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
相关推荐
小生不才yz38 分钟前
(三)命令管理-命令历史-history命令的使用
linux
空灵之海2 小时前
Docker部署Nexus Repository Community Edition
运维·docker·容器
aramae2 小时前
Linux开发工具入门:零基础到熟练使用(二)
linux·运维·服务器·网络·笔记
nassi_3 小时前
I/O详解
linux·php
咖啡教室3 小时前
程序员应该掌握的网络命令telnet、ping和curl
运维·后端
泡沫冰@3 小时前
shell编程:sed - 流编辑器(6)
linux
爱吃喵的鲤鱼3 小时前
仿muduo库One Thread One Loop主从Reactor模型实践——介绍
linux·c++
庄风子4 小时前
In VI, when an arrow key is pressed, a character (e.g. “A“) is sent.
linux·vi
优秘智能UMI4 小时前
UMI企业智脑智能营销:多平台视频矩阵引领营销新潮流
大数据·运维·人工智能·ai·矩阵·aigc
荣光波比5 小时前
ZooKeeper与Kafka分布式协调系统实战指南:从基础原理到集群部署
运维·分布式·zookeeper·kafka·云计算