# 1、备份现有源
sudo cp /etc/apt/sources.list /etc/apt/sources.list_bak |
# 2、一般情况下,将 /etc/apt/sources.list 文件中 Debian 默认的源地址 http://deb.debian.org/ 替换为国内源即可。
#中国科技大学 | |
sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g'/etc/apt/sources.list | |
#网易云 163 | |
sudo sed -i 's/deb.debian.org/mirrors.163.com/g'/etc/apt/sources.list | |
#阿里云 | |
sudo sed -i 's/deb.debian.org/mirrors.aliyun.com/g'/etc/apt/sources.list | |
#清华同方 | |
sudo sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g'/etc/apt/sources.list |