服務熱線: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小時客服服務熱線

關注
微信

關注官方微信
頂部
网上打鱼输钱经历