Debian 如何更新源

1.备份

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

2.编辑源

sudo vim /etc/apt/sources.list

vim内容为

deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ buster/updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security/ buster/updates main non-free contrib

3.更新

sudo apt-get update
sudo apt-get upgrade

 

参考资料

https://segmentfault.com/a/1190000024419040

 

posted @ 2022-10-13 16:29  o蹲蹲o  阅读(853)  评论(0编辑  收藏  举报