Linux 更换软件源

100 次浏览

1、备份原始源列表文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2、编辑源列表文件

sudo nano /etc/apt/sources.list

3、添加阿里云镜像源

Debian 12:

# 默认使用阿里云镜像源
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian-security/ bookworm-security main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main non-free non-free-firmware contrib

deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib

4、更新软件包列表

sudo apt update

5、更新软件

sudo apt upgrade

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注

滚动至顶部