Debian9 Stretch如何更换apt源

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

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

阿里云apt源

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

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

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

腾讯云云产品双12限时秒杀【点击购买】

搬瓦工,CN2高速线路,1GB带宽,电信联通优化KVM,延迟低,速度快,建站稳定,搬瓦工BandwagonHost VPS优惠码BWH26FXH3HIQ,支持<支付宝> 【点击购买】!

Vultr$3.5日本节点,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快【点击购买】!

阿里云香港、新加坡VPS/1核/1G/25G SSD/1T流量/30M带宽/年付¥288【点击购买】

百度云不止一折优惠【点击购买】

发表评论

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