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