0
点赞
收藏
分享

微信扫一扫

ubuntu19.04更改国内镜像源

烟中雯城 2022-06-09 阅读 177

ubuntu19.04更改国内镜像源

最近搞了个19.04版本的ubuntu玩玩,如何配置相应版本的国内镜像源?
原镜像源文件存放在目录/etc/apt/sources.list下,我们拷贝一份sources.list文件,以便备用。

$ sudo cp -v /etc/apt/sources.list /etc/apt/sources.list.backup

然后将以下内容拷贝到sources.list

deb http://mirrors.aliyun.com/ubuntu/ disco main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ disco main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ disco-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ disco-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ disco-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ disco-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ disco-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ disco-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ disco-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ disco-proposed main restricted universe multiverse

这个镜像源是阿里的,但注意这个地方

ubuntu19.04更改国内镜像源_sed
有个disco,这是个系统代号,不同的系统代号是不同的,disco是ubuntu19.04版本的代号,比如ubuntu18.04的系统代号是bionic
可以通过命令lsb_release -c查看系统代号
ubuntu19.04更改国内镜像源_镜像源_02
如果你找到的是其他版本使用的镜像源,那可以试着把其中的系统代号换成当前系统的代号即可。亲测18.04版本换19.04版本成功_~
更改好后更新即可:

$ sudo apt-get update

#ubuntu/ubuntu19.04更改国内镜像源#



举报

相关推荐

0 条评论