Linux-Debian 9.x 配置apt-get源

本文参照链接:https://blog.csdn.net/biao0309/article/details/87446361
前言
Debian使用国外镜像源,在国内使用会造成更新软件慢或者找不到等问题,装完系统,应对软件源进行设置,改为国内源,下载速度就变快。
国内的源有很多,这里以阿里源为例:
1.打开站点 :https://opsx.alibaba.com/mirror
2.找到debian相关内容,点开右边debian使用帮助页面
在这里插入图片描述3.以(Debian 9.x为例)复制与当前系统版本匹配的源地址
在这里插入图片描述
4.备份原来的源配置文件cp /etc/apt/sources.list /etc/apt/sources.list.backup
5.打开源配置文件vi /etc/apt/sources.list将下面复制好的内容粘贴,wq保存!
(注:/etc/apt/sources.list文件中原有的内容根据需要可全部删除亦或全部注释)

#debian 9.x (stretch)
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

6.配置好之后更新软件包列表apt-get update
7.可安装一个tree命令测试下apt源是否更新成功:apt-get install tree
在这里插入图片描述
8.升级系统所有软件apt-get upgrade
9.升级系统版本apt-get dist-upgrade

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值