sudo lsb_release -a
傳送門地址
注:該網頁提供了阿里雲支持的ubuntu系統下各個Codename版本shell
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
Codename=$( (lsb_release -a)|awk '{print $2}'|tail -n 1 ) echo "\ deb http://mirrors.aliyun.com/ubuntu/ $Codename main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-security main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-updates main multiverse restricted universe " >sources.list
sudo apt-get update
sudo apt-get upgrade