ubuntu 22.04如何更换阿里源
1、系统信息
root@ubuntu2204test01:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy
2、进入 /etc/apt/ 目录:
root@ubuntu2204test01:~# cd /etc/apt/
3、备份默认源文件
root@ubuntu2204test01:/etc/apt# cp sources.list sources.list_bak
4、编辑源配置文件
root@ubuntu2204test01:/etc/apt# vim 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 http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
5、跟新软件库
root@ubuntu2204test01:/etc/apt# apt update
6、升级软件
root@ubuntu2204test01:/etc/apt# apt upgrade