Ubuntu 19.10 19.04 18.04 18.10等系统版本修改国内镜像源

Ubuntu安装好之后下载软件总是很慢,原因在于默认镜像源为国外服务器访问较慢,更改为国内镜像源后显著提高访问速度。

较好用的国内镜像源:阿里云,网易,中科大,东软等

这里以Ubuntu19.10,阿里云镜像源为例
不同版本的系统代号不同,只需要修改镜像源中的系统代号就可以兼容自己的ubuntu版本。
19.10系统代号:eoan

查看系统代号(Ubuntu19.10)
lsb_release -c
在这里插入图片描述

1.镜像源文件存放在/etc/apt/sources.list下,拷贝一份sources.list文件,以防万一。

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

2.使用gedit编辑镜像源文件。

sudo  gedit /etc/apt/sources.list

3.替换文件,将以下内容拷贝到sources.list,将下面代码中的  eoan 改为自己版本的系统代号即可。

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

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

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

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

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

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

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

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

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

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

4.改好之后更新一下

sudo apt-get update
sudo apt-get upgrade

至此Ubuntu的软件下载速度会大大提高

发布了51 篇原创文章 · 获赞 1 · 访问量 6023

猜你喜欢

转载自blog.csdn.net/qq_39827677/article/details/104627292
今日推荐