Aug 18

两行:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#下面任选1个
#Ubuntu
#中科大
sudo sed -i 's~ports.ubuntu.com~mirrors.ustc.edu.cn/ubuntu-ports/~g' /etc/apt/sources.list
#清华
sudo sed -i 's~ports.ubuntu.com~mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/~g' /etc/apt/sources.list
#阿里云
sudo sed -i 's~ports.ubuntu.com~mirrors.aliyun.com/ubuntu-ports/~g' /etc/apt/sources.list
#台湾
sudo sed -i 's~ports.ubuntu.com~tw.archive.ubuntu.com/ubuntu-ports/~g' /etc/apt/sources.list
#Debian
#中科大
sudo sed -i 's~httpredir.debian.org~mirrors.ustc.edu.cn~g' /etc/apt/sources.list
#清华
sudo sed -i 's~httpredir.debian.org~mirrors.tuna.tsinghua.edu.cn~g' /etc/apt/sources.list
#阿里云
sudo sed -i 's~httpredir.debian.org~mirrors.aliyun.com~g' /etc/apt/sources.list
#台湾
sudo sed -i 's~httpredir.debian.org~tw.archive.ubuntu.com~g' /etc/apt/sources.list

点击显示引用框
引用本文,复制粘贴...