1、系统信息
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
2、进入 /etc/apt/ 目录:
cd /etc/apt/
3、备份默认源文件
sudo cp sources.list sources.list_bak
4、编辑源配置文件
sudo gedit sources.list
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src

本文介绍了如何在Ubuntu22.04系统中更改默认的软件源为阿里云镜像,包括备份原source.list、编辑文件添加阿里云镜像源,以及执行aptupdate和aptupgrade来更新和升级软件。
最低0.47元/天 解锁文章
2165





