deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
自动换源
1 2 3 4 5 6 7 8 9 10 11 12 13
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 apt-get update