分享页面

Debian8系统如何编辑文件sources.list更换下载源

发布时间:2021-07-20 14:03

debian8系统如何编辑文件sources.list更换下载源?本教程以debian8系统为例

本配置适用于debian89版本

1.编辑sources.list文本

vi /etc/apt/sources.list

可以把之前的文本源拷贝到其他地方或者前面打#

这边我打#号处理

2.更换源文本到sources.list文件上

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.ustc.edu.cn/debian/ stretch main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free

deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free

deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free

deb-src https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free

deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free

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

阿里云镜像站

deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib

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

deb http://mirrors.aliyun.com/debian-security stretch/updates main

deb-src http://mirrors.aliyun.com/debian-security stretch/updates main

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

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

deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib

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

华为镜像站

deb https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free

deb-src https://mirrors.huaweicloud.com/debian/ stretch main contrib non-free

deb https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free

deb-src https://mirrors.huaweicloud.com/debian/ stretch-updates main contrib non-free

deb https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free

deb-src https://mirrors.huaweicloud.com/debian/ stretch-backports main contrib non-free

清华大学镜像站

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

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

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

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

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

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

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

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

兰州大学镜像站

deb http://mirror.lzu.edu.cn/debian stable main contrib non-free

deb-src http://mirror.lzu.edu.cn/debian stable main contrib non-free

deb http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free

deb-src http://mirror.lzu.edu.cn/debian stable-updates main contrib non-free

deb http://mirror.lzu.edu.cn/debian/ stretch-backports main contrib non-free

deb-src http://mirror.lzu.edu.cn/debian/ stretch-backports main contrib non-free

deb http://mirror.lzu.edu.cn/debian-security/ stretch/updates main contrib non-free

deb-src http://mirror.lzu.edu.cn/debian-security/ stretch/updates main contrib non-free

上海交大镜像站

deb https://mirror.sjtu.edu.cn/debian/ stretch main contrib non-free

deb-src https://mirror.sjtu.edu.cn/debian/ stretch main contrib non-free

deb https://mirror.sjtu.edu.cn/debian/ stretch-updates main contrib non-free

deb-src https://mirror.sjtu.edu.cn/debian/ stretch-updates main contrib non-free

deb https://mirror.sjtu.edu.cn/debian/ stretch-backports main contrib non-free

deb-src https://mirror.sjtu.edu.cn/debian/ stretch-backports main contrib non-free

deb https://mirror.sjtu.edu.cn/debian-security/ stretch/updates main contrib non-free

deb-src https://mirror.sjtu.edu.cn/debian-security/ stretch/updates main contrib non-free

以上是各类源的文本

1.这边举例为163源替换上去

文件保存退出

2.更新源

apt-get update

即可更换成功

本文导读