服务热线:4008-650-660
11
产品文档
控制台使用
基础类问题
应用类问题
网络类问题
安全类问题
Ubuntu修改软件源

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

下面以修改 Ubuntu 软件源为 网时云为例进行说明(镜像地址/香港节点镜像地址)

1、备份原配置文件

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

2、更改配置文件

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

Xenial(16.04)

  deb http://mirrors.niaoyun.com/ubuntu/ Xenial main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Xenial-security main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Xenial-updates main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Xenial-proposed main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Xenial-backports main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Xenial main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Xenial-security main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Xenial-updates main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Xenial-proposed main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Xenial-backports main restricted universe multiverse

Trusty(14.04)

  deb http://mirrors.niaoyun.com/ubuntu/ Trusty main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Trusty-security main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Trusty-updates main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Trusty-proposed main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ Trusty-backports main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Trusty main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Trusty-security main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Trusty-updates main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Trusty-proposed main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ Trusty-backports main restricted universe multiverse

Precise(12.04)

  deb http://mirrors.niaoyun.com/ubuntu/ precise main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ precise-security main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ precise-updates main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ precise-proposed main restricted universe multiverse
  deb http://mirrors.niaoyun.com/ubuntu/ precise-backports main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ precise main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ precise-security main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ precise-updates main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ precise-proposed main restricted universe multiverse
  deb-src http://mirrors.niaoyun.com/ubuntu/ precise-backports main restricted universe multiverse


如果是香港节点:

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

Xenial(16.04)

  deb http://hk.mirrors.niaoyun.com/ubuntu/ Xenial main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-security main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-updates main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-proposed main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-backports main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Xenial main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-security main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-updates main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-proposed main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Xenial-backports main restricted universe multiverse

Trusty(14.04)

  deb http://hk.mirrors.niaoyun.com/ubuntu/ Trusty main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-security main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-updates main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-proposed main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-backports main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Trusty main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-security main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-updates main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-proposed main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ Trusty-backports main restricted universe multiverse

Precise(12.04)

deb http://hk.mirrors.niaoyun.com/ubuntu/ precise main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ precise-security main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ precise-updates main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ precise-proposed main restricted universe multiverse
  deb http://hk.mirrors.niaoyun.com/ubuntu/ precise-backports main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ precise main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ precise-security main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ precise-updates main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ precise-proposed main restricted universe multiverse
  deb-src http://hk.mirrors.niaoyun.com/ubuntu/ precise-backports main restricted universe multiverse

3、更新

# apt-get update


这条帮助是否解决了您的问题? 已解决 未解决

提交成功!非常感谢您的反馈,我们会继续努力做到更好! 很抱歉未能解决您的疑问。我们已收到您的反馈意见,同时会及时作出反馈处理!

在线
客服

在线客服服务时间:8:30-18:30

售后支持

客服
热线

4008-650-660
7*24小时客服服务热线

关注
微信

关注官方微信
顶部