1
0

添加 ubuntu-sources-22.04.md

This commit is contained in:
8ga 2025-01-10 11:12:51 +08:00
parent e0f0403080
commit 5c55344d61

35
ubuntu-sources-22.04.md Normal file
View File

@ -0,0 +1,35 @@
备份 source.list 文件
```
cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
```
vim /etc/apt/sources.list
```
复制粘贴
```
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
```
更新
```
apt update
```
升级现有软件包(可选)
```
apt upgrade
```
修改 PPA 和第三方源(如果有的话)
```
/etc/apt/sources.list.d/
```
替换 ppa 文件的URL一般将 ppa.launchpad.net 修改为 ppa.mirrors.aliyun.com
```
deb http://ppa.mirrors.aliyun.com/ppa/username/repositoryname/ jammy main
```