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
posted on 2023-06-09 20:25  mossTao  阅读(1999)  评论(0编辑  收藏  举报