Debian9 Stretch如何更换apt源

前篇我们介绍了 Windows 10启用Linux子系统(WSL) 图文教程, 但是这里的apt源是官方的源,在国内更新比较慢。所以我们这里记录一下如何更换debian9的apt源。

编辑apt源文件
/etc/apt/sources.list

阿里云apt源

deb http://mirrors.aliyun.com/debian stretch main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch main contrib non-free
deb http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian stretch-updates main contrib non-free
deb http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main contrib non-free
Debian9 Stretch如何更换apt源

163源

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

清华源

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib 
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch main non-free contrib 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-updates main non-free contrib 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ stretch-backports main non-free contrib 
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main non-free contrib 
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ stretch/updates main non-free contrib

你也可以把”Stretch”换成”jessie”,”wheezy”。分别对应Debian9,Debian8,Debian7版本。

如何查询自己的Linux版本参考如下:

cat /etc/issue

更新apt源

apt-get update
Debian9 Stretch如何更换apt源

通过终端窗口的信息就可以看出来,此时请求的就是阿里云的镜像。

链接到文章: https://vpsum.com/45645.html

发表回复

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