ubuntu19.10更改国内镜像源

ubuntu19.10更改国内镜像源

原文链接 此文写的比较清晰,就直接转载了原作者的博文,侵权删

首先将我们的原来的软件源另存起来备份:

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

终端执行chmod命令更改文件权限使软件源文件可编辑:

sudo chmod 777 /etc/apt/sources.list

之后通过gedit命令编辑软件源:

sudo gedit /etc/apt/sources.list

然后将下面任意一个源复制进去保存就好了:

阿里云源:

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

清华源:

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
 
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
 
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
 
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
 
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse
 
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
 
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse

修改完软件源后,更新软件列表和软件:

sudo apt update
sudo apt upgrade

注意:“eoan”为ubuntu版本名!“eoan”代表ubuntu19.10,“xenial”代表ubuntu16.04,“bionic”代表ubuntu18.04,“disco”代表ubuntu19.04, 如果自己的版本不再所描述的上面,可以通过查看,并更改相应位置就ok了!

lsb_release -c

————————————————
版权声明:本文为CSDN博主「大数据之眸」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_36936730/article/details/104854883

你可能感兴趣的:(解决方案)