由于預設的apt源下載下傳很慢,是以我們需要修改成國内源:
1.首先備份之前的源:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.然後打開源檔案
:
sudo vim /etc/apt/sources.list
3.我們這裡要修改成阿裡的源:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
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