ubuntu 下载速度太慢

来源:互联网 发布:为什么淘宝电脑便宜 编辑:程序博客网 时间:2024/04/30 04:38

问题:

使用apt-get时,更新的速度太慢,记得之前使用公司的virtual-box更新时一点都不慢

解决方式:

修改ubuntu的软件源

打开sources.list文件

$ sudo  vim /etc/apt/sources.list (最好把原有的文件做个备份,将原有的文件改个名字,创建个新的文件 /etc/apt/sources.list),(备份命令 cp ,创建文件命令touch)

修改文件的内容为:

# # deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ trusty main restricted# deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ trusty main restricted#mirrors.163.com deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiversedeb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiversedeb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricteddeb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted## Major bug fix updates produced after the final release of the## distribution.deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricteddeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu## team. Also, please note that software in universe WILL NOT receive any## review or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ trusty universedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty universedeb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu## security team.deb http://us.archive.ubuntu.com/ubuntu/ trusty multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiversedeb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse## N.B. software from this repository may not have been tested as## extensively as that contained in the main release, although it includes## newer versions of some applications which may provide useful features.## Also, please note that software in backports WILL NOT receive any review## or updates from the Ubuntu security team.deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiversedeb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu trusty-security main restricteddeb-src http://security.ubuntu.com/ubuntu trusty-security main restricteddeb http://security.ubuntu.com/ubuntu trusty-security universedeb-src http://security.ubuntu.com/ubuntu trusty-security universedeb http://security.ubuntu.com/ubuntu trusty-security multiversedeb-src http://security.ubuntu.com/ubuntu trusty-security multiverse## Uncomment the following two lines to add software from Canonical's## 'partner' repository.## This software is not part of Ubuntu, but is offered by Canonical and the## respective vendors as a service to Ubuntu users.# deb http://archive.canonical.com/ubuntu trusty partner# deb-src http://archive.canonical.com/ubuntu trusty partner## Uncomment the following two lines to add software from Ubuntu's## 'extras' repository.## This software is not part of Ubuntu, but is offered by third-party## developers who want to ship their latest software.# deb http://extras.ubuntu.com/ubuntu trusty main# deb-src http://extras.ubuntu.com/ubuntu trusty main

使用 $ sudo apt-get update会发现速度好好多了。

【注意:】在复制粘贴之前最好按下insert键,因为直接按粘贴时,如果文字过长会发现部分内容会丢失



原创粉丝点击