Fork me on GitHub

Ubuntu 更换国内源

转载自:https://blog.csdn.net/qq_35451572/article/details/79516563

Ubuntu系统自带的源都是国外的网址,国内用户在使用的时候网速比较慢。一个软件的下载是十分痛苦的,这里讲解一下如何将国外源更换为国内源,让你的网速Biu.Biu.Biu

1.备份原来的源
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
1
将以前的源备份一下,以防以后可以用的。

2.更换源
sudo gedit /etc/apt/sources.list
1
使用gedit打开文档,将下边的阿里源复制进去,然后点击保存关闭。

阿里源

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

3.更新
更新源

sudo apt-get update

复损坏的软件包,尝试卸载出错的包,重新安装正确版本的。

sudo apt-get -f install

更新软件

sudo apt-get upgrade

posted @ 2018-10-29 09:37  ink.liu  阅读(2879)  评论(0编辑  收藏  举报