Debian 9(代號爲 Stretch),鏡像源已由原來的jessie更新爲了stretch,爲了安全起見需要先備份,再進行配置新的鏡像源。修改debian9鏡像源方法如下:
1、備份原有鏡像源配置文件: cp /etc/apt/sources.list /etc/apt/sources.list.bak
2、打開sources.list文件,註釋原有CD源代碼,更新鏡像源地址爲163鏡像源,代碼如下:
deb http://mirrors.163.com/debian/ stretch main non-free contrib
deb http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ stretch-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ stretch/updates main non-free contrib
配置完畢之後輸入:apt update 命令更新系統鏡像源配置文件。