Ubuntu修改APT软件源 |
Linux拥有众多的发行版,每个发行版都有提供镜像,但是,有些镜像的下载速度参差不齐,偶尔会有更新失败的情况。 下面以修改 Ubuntu 软件源为中科大为例进行说明。 镜像地址:https://mirrors.ustc.edu.cn/ 1、备份原配置文件# cp /etc/apt/sources.list /etc/apt/sources.list.backup 2、更改配置文件编辑 Xenial(16.04) deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ xenial universedeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates universedeb https://mirrors.ustc.edu.cn/ubuntu/ xenial multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security universedeb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security multiverse Trusty(14.04) deb https://mirrors.ustc.edu.cn/ubuntu/ trusty main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-updates main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ trusty universedeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-updates universedeb https://mirrors.ustc.edu.cn/ubuntu/ trusty multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-updates multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-backports main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-security main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-security universedeb https://mirrors.ustc.edu.cn/ubuntu/ trusty-security multiverse Precise(12.04) deb https://mirrors.ustc.edu.cn/ubuntu/ precise main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ precise universedeb https://mirrors.ustc.edu.cn/ubuntu/ precise-updates universedeb https://mirrors.ustc.edu.cn/ubuntu/ precise multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ precise-security main restricteddeb https://mirrors.ustc.edu.cn/ubuntu/ precise-security universedeb https://mirrors.ustc.edu.cn/ubuntu/ precise-security multiverse 3、更新# apt-get update |