安裝Ubuntu 18.04後,使用國外源太慢了,修改成國內源會快不少。linux
修改阿里源爲Ubuntu 18.04默認的源ubuntu
備份/etc/apt/sources.list
#備份
cp /etc/apt/sources.list /etc/apt/sources.list.bakionic
在/etc/apt/sources.list文件前面添加以下條目
#添加阿里源
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 multiversespa
最後執行以下命令更新源
##更新
sudo apt-get update
sudo apt-get upgraderest
apt-get三個重要命令get