Linux擁有衆多的發行版,每個發行版都有提供鏡像,但是,有些鏡像的下載速度參差不齊,偶爾會有更新失敗的情況。
下面以修改 Debian 軟件源爲 中科大爲例進行說明:
鏡像地址:https://mirrors.ustc.edu.cn/
1、備份原配置文件:
# cp /etc/apt/sources.list /etc/apt/sources.list.backup
2、修改軟件源配置文件
debian 7.x (wheezy)
編輯/etc/apt/sources.list文件
, 將內容修改爲:
-
deb http://mirrors.ustc.edu.cn/debian wheezy main non-free contrib
-
deb http://mirrors.ustc.edu.cn/debian wheezy-proposed-updates main non-free contrib
-
deb-src http://mirrors.ustc.edu.cn/debian wheezy main non-free contrib
-
deb-src http://mirrors.ustc.edu.cn/debian wheezy-proposed-updates main non-free contrib
debian 8.x (jessie) 編輯/etc/apt/sources.list
文件, 將內容修改爲:
deb http://mirrors.ustc.edu.cn/debian jessie main non-free contrib deb http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian jessie main non-free contrib deb-src http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main non-free contrib
3、更新
# apt-get update