欢迎光临
我们一直在努力

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)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。