Ubuntu使用阿里云软件源

如果在安装Ubuntu时,选择的地区为美国,建议更新为阿里云或国内 软件源

sudo sed -i s/archive.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
sudo sed -i s/security.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.listsudo apt-get update

如果在安装Ubuntu时,选择的地区为中国,可以直接使用或更新为阿里云软件源

sudo sed -i s/cn.archive.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
sudo sed -i s/security.ubuntu.com/mirrors.aliyun.com/g /etc/apt/sources.list
sudo apt-get update