2022
我们一起努力

Ubuntu 18.04更换apt-get源的方法(ubuntu 18.04更换国内源)

使用apt-get安装时,会很慢,更换了国内的源后,就可以解决这个问题了。

1. 备份sources.list文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2. 打开sources.list文件

sudo gedit /etc/apt/sources.list

3. 删除原内容,添加下列内容

#清华源
deb /uploads/tupian/20220831/jj1k3n4mcr2 bionic main restricted universe multiversedeb-src /uploads/tupian/20220831/jj1k3n4mcr2 bionic main restricted universe multiversedeb /uploads/tupian/20220831/jj1k3n4mcr2 bionic-updates main restricted universe multiversedeb-src /uploads/tupian/20220831/jj1k3n4mcr2 bionic-updates main restricted universe multiversedeb /uploads/tupian/20220831/jj1k3n4mcr2 bionic-backports main restricted universe multiversedeb-src /uploads/tupian/20220831/jj1k3n4mcr2 bionic-backports main restricted universe multiversedeb /uploads/tupian/20220831/jj1k3n4mcr2 bionic-security main restricted universe multiversedeb-src /uploads/tupian/20220831/jj1k3n4mcr2 bionic-security main restricted universe multiversedeb /uploads/tupian/20220831/jj1k3n4mcr2 bionic-proposed main restricted universe multiversedeb-src /uploads/tupian/20220831/jj1k3n4mcr2 bionic-proposed main restricted universe multiverse

#阿里云
deb /uploads/tupian/20220831/yviysanldby bionic main restricted universe multiverse
deb /uploads/tupian/20220831/yviysanldby bionic-security main restricted universe multiverse
deb /uploads/tupian/20220831/yviysanldby bionic-updates main restricted universe multiverse
deb /uploads/tupian/20220831/yviysanldby bionic-proposed main restricted universe multiverse
deb /uploads/tupian/20220831/yviysanldby bionic-backports main restricted universe multiverse
deb-src /uploads/tupian/20220831/yviysanldby bionic main restricted universe multiverse
deb-src /uploads/tupian/20220831/yviysanldby bionic-security main restricted universe multiverse
deb-src /uploads/tupian/20220831/yviysanldby bionic-updates main restricted universe multiverse
deb-src /uploads/tupian/20220831/yviysanldby bionic-proposed main restricted universe multiverse
deb-src /uploads/tupian/20220831/yviysanldby bionic-backports main restricted universe multiverse

这两个源都可以用,我都试过,感觉阿里云源速度更快。

4. 更新

保存sources.list文件后需要更新apt-get。

sudo apt-get update

更新完成后就可以正常使用了。

到此这篇关于Ubuntu 18.04更换apt-get源的文章就介绍到这了,更多相关Ubuntu 18.04更换apt-get源内容请搜索站长源码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持站长源码网!

本文从互联网转载,来源地址:www.downzz.com/fuwuqi/187221.html,原作者保留一切权利,若侵权或引用不当,请联系茶猫云(cmy.cn)删除。【茶猫云,优质云服务器提供商】

赞(0)
文章名称:《Ubuntu 18.04更换apt-get源的方法(ubuntu 18.04更换国内源)》
文章链接:https://www.fzvps.com/40870.html
本站文章来源于互联网,如有侵权,请联系管理删除,本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
图片版权归属各自创作者所有,图片水印出于防止被无耻之徒盗取劳动成果的目的。

评论 抢沙发

评论前必须登录!