Ubuntu修改APT软件源

2018-12-01 17:16:09 7607

Linux拥有众多的发行版,每个发行版都有提供镜像,但是,有些镜像的下载速度参差不齐,偶尔会有更新失败的情况。


下面以修改 Ubuntu 软件源为小鸟云为例进行说明。


镜像地址:http://www.landui.com


1、备份原配置文件

# cp /etc/apt/sources.list /etc/apt/sources.list.backup

2、更改配置文件

编辑/etc/apt/sources.list文件, 将内容修改为:


Xenial(16.04)


deb http://www.landui.com/ubuntu/ xenial main restricted

deb http://www.landui.com/ubuntu/ xenial-updates main restricted

deb http://www.landui.com/ubuntu/ xenial universe

deb http://www.landui.com/ubuntu/ xenial-updates universe

deb http://www.landui.com/ubuntu/ xenial multiverse

deb http://www.landui.com/ubuntu/ xenial-updates multiverse

deb http://www.landui.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://www.landui.com/ubuntu xenial-security main restricted

deb http://www.landui.com/ubuntu xenial-security universe

deb http://www.landui.com/ubuntu xenial-security multiverse

Trusty(14.04)


deb http://www.landui.com/ubuntu/ trusty main restricted

deb-src http://www.landui.com/ubuntu/ trusty main restricted

deb http://www.landui.com/ubuntu/ trusty-updates main restricted

deb-src http://www.landui.com/ubuntu/ trusty-updates main restricted

deb http://www.landui.com/ubuntu/ trusty universe

deb-src http://www.landui.com/ubuntu/ trusty universe

deb http://www.landui.com/ubuntu/ trusty-updates universe

deb-src http://www.landui.com/ubuntu/ trusty-updates universe

deb http://www.landui.com/ubuntu/ trusty multiverse

deb-src http://www.landui.com/ubuntu/ trusty multiverse

deb http://www.landui.com/ubuntu/ trusty-updates multiverse

deb-src http://www.landui.com/ubuntu/ trusty-updates multiverse

deb http://www.landui.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://www.landui.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://www.landui.com/ubuntu trusty-security main restricted

deb-src http://www.landui.com/ubuntu trusty-security main restricted

deb http://www.landui.com/ubuntu trusty-security universe

deb-src http://www.landui.com/ubuntu trusty-security universe

deb http://www.landui.com/ubuntu trusty-security multiverse

deb-src http://www.landui.com/ubuntu trusty-security multiverse

Precise(12.04)


deb http://www.landui.com/ubuntu/ precise main restricted

deb-src http://www.landui.com/ubuntu/ precise main restricted

deb http://www.landui.com/ubuntu/ precise-updates main restricted

deb-src http://www.landui.com/ubuntu/ precise-updates main restricted

deb http://www.landui.com/ubuntu/ precise universe

deb-src http://www.landui.com/ubuntu/ precise universe

deb http://www.landui.com/ubuntu/ precise-updates universe

deb-src http://www.landui.com/ubuntu/ precise-updates universe

deb http://www.landui.com/ubuntu/ precise multiverse

deb-src http://www.landui.com/ubuntu/ precise multiverse

deb http://www.landui.com/ubuntu/ precise-updates multiverse

deb-src http://www.landui.com/ubuntu/ precise-updates multiverse

deb http://www.landui.com/ubuntu/ precise-backports main restricted universe multiverse

deb-src http://www.landui.com/ubuntu/ precise-backports main restricted universe multiverse

deb http://www.landui.com/ubuntu precise-security main restricted

deb-src http://www.landui.com/ubuntu precise-security main restricted

deb http://www.landui.com/ubuntu precise-security universe

deb-src http://www.landui.com/ubuntu precise-security universe

deb http://www.landui.com/ubuntu precise-security multiverse

deb-src http://www.landui.com/ubuntu precise-security multiverse

3、更新

# apt-get update


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: