博客專欄

        EEPW首頁 > 博客 > Ubuntu使用apt-get下載速度慢的解決方法

        Ubuntu使用apt-get下載速度慢的解決方法

        發布人:電子禪石 時間:2020-09-17 來源:工程師 發布文章

        Ubuntu使用apt-get下載速度慢的解決方法


        查看所用的源:

        $ sudo vim /etc/apt/sources.list

         

        由于安裝的Ubuntu Server 16.04.1 LTS是英文版的,軟件源就默認都是 us.archive.ubuntu.com(英國) 的,所以很慢。

        # deb cdrom:[Ubuntu-Server 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted #deb cdrom:[Ubuntu-Server 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution.deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted ## Major bug fix updates produced after the final release of the## distribution.deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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/ xenial universe# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial universedeb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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/ xenial multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiversedeb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-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/ xenial-backports main restricted universe multiverse# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe 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 xenial partner# deb-src http://archive.canonical.com/ubuntu xenial partnerdeb http://security.ubuntu.com/ubuntu xenial-security main restricted# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricteddeb http://security.ubuntu.com/ubuntu xenial-security universe# deb-src http://security.ubuntu.com/ubuntu xenial-security universedeb http://security.ubuntu.com/ubuntu xenial-security multiverse# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

        為了提高下載速度,將源改為國內的 cn.archive.ubuntu.com ,現在 cn.archive.ubuntu.com 指向阿里云的開源鏡像站 mirrors.aliyun.com,下載速度很快。

         

        1. 重命名原來的源作為備份:

        $ sudo mv /etc/apt/sources.list sources.list_backup


        2. 新建一個sources.list文件

        $ sudo vim /etc/apt/sources.list

        輸入如下內容并保存退出:

        deb http://cn.archive.ubuntu.com/ubuntu/ xenial main restricteddeb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates main restricteddeb http://cn.archive.ubuntu.com/ubuntu/ xenial universedeb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates universedeb http://cn.archive.ubuntu.com/ubuntu/ xenial multiversedeb http://cn.archive.ubuntu.com/ubuntu/ xenial-updates multiversedeb http://cn.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiversedeb http://security.ubuntu.com/ubuntu xenial-security main restricteddeb http://security.ubuntu.com/ubuntu xenial-security universedeb http://security.ubuntu.com/ubuntu xenial-security multiverse

        3. 更新apt軟件源:

        $ sudo apt-get update

         

         

        轉自https://blog.csdn.net/a787202867/article/details/53084602


        *博客內容為網友個人發布,僅代表博主個人觀點,如有侵權請聯系工作人員刪除。



        關鍵詞:

        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 鄄城县| 洛扎县| 兰考县| 铜陵市| 泰安市| 瓮安县| 寻甸| 敖汉旗| 高州市| 古浪县| 华亭县| 安仁县| 博兴县| 鄂伦春自治旗| 潮安县| 乌海市| 双牌县| 江源县| 马山县| 富锦市| 琼结县| 土默特右旗| 如皋市| 富源县| 庄河市| 安吉县| 色达县| 探索| 藁城市| 泰兴市| 长宁区| 望谟县| 武功县| 元氏县| 紫云| 怀来县| 三江| 内江市| 尉氏县| 庆安县| 海淀区|