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