Ubuntu原來的源下載更新很慢 所以我們對源進行更改,換成國內常用的源
源所在的目錄是在/var/apt目錄下 我們可以先進入這個目錄
找到source.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 multiverse
此處我使用nano命令進行修改,其他方式也可以修改,可以自行選擇
修改完之後進行更新 sudo apt-get update
此時下載或者更新速度會變得快多了