sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list
更新软件源索引
sudo apt-get update
阿里源
官方文档
sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.aliyun.com@g" /etc/apt/sources.list
华为源
官方文档
sudo sed -i "s@http://.*archive.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://repo.huaweicloud.com@g" /etc/apt/sources.list
清华源
官方文档
sudo sed -i "s@http://.*archive.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@https://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list
腾讯源
官方文档
sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.cloud.tencent.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.cloud.tencent.com@g" /etc/apt/sources.list
网易源
官方文档
sudo sed -i "s@http://.*archive.ubuntu.com@http://mirrors.163.com@g" /etc/apt/sources.list sudo sed -i "s@http://.*security.ubuntu.com@http://mirrors.163.com@g" /etc/apt/sources.list