Debian更换软件源

Debian更换软件源,第1张

备份一下软件源

一般情况下,将 /etc/apt/sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ 替换为 http://mirrors.aliyun.com/debian/ 即可。

当然也可以明宴直接卖者编辑 /etc/apt/sources.list 文中槐薯件(需要使用 sudo)。

用以下命令打开配置文件

更改完 sources.list 文件后请运行命令, 更新索引以生效。

安装软件,跟Ubuntu命令一样

警告

*** 作前请做好相应备份

一般情况下,将 /etc/apt/雀和sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ 替换为 http://mirrors.ustc.edu.cn 即可。

可以使用如下命令:

当然也可以直接编辑 /etc/apt/sources.list 文件(需要使用 sudo)。以下是 Debian Stable 参考配置内容:

同时你也可能需要更改 Debian Security 源,请参考 Debian Security 源使用帮助带丛

更蠢岁樱改完 sources.list 文件后请运行 sudo apt-get update 更新索引以生效。

使用 HTTPS 可以有效避免国内运营商的缓存劫持,但需要事先安装 apt-transport-https (Debian Buster 及以上版本不需要)。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/12205429.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-21
下一篇 2023-05-21

发表评论

登录后才能评论

评论列表(0条)

保存