debian10 更新apt-get源

debian版本

执行以下命令,查看当前debian版本号:

cat /etc/issue

结果如下:

root@l:~# cat /etc/issue
Debian GNU/Linux 10 \n \l

更新源

备份sources.list文件:

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

修改sources.list文件内容,删除默认的内容,改成国内源:

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

然后执行更新命令:

apt-get update
apt-get upgrade

你可能感兴趣的:(debian,apt-get)