1.先備份:sudo cp /etc/apt/sources.list /etc/apt/sources.list_backupubuntu
2.編輯元列表文件:sudo vim /etc/apt/sources.listvim
ps:若是找不到vim命令,請先安裝vim:sudo apt-get install vimionic
3.註釋掉sources.list中的全部內容,將下面內容粘貼進去:rest
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverseget
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverseit
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverseio
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversesed
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse軟件
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedate
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
4.更新軟件列表:sudo apt-get update
5.更新軟件包:sudo apt-get upgrade
上述內容能夠快速應對相信阿里的各位新手同窗,若是以爲有其餘更好的方式,歡迎交流。