天天看點

ubuntu18.04 修改apt源

由于預設的apt源下載下傳很慢,是以我們需要修改成國内源:

1.首先備份之前的源:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
           

2.然後打開源檔案

:

sudo vim /etc/apt/sources.list
           
ubuntu18.04 修改apt源

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
           
ubuntu18.04 修改apt源

就變成阿裡的源了,網速也快了不少!!!

更新軟體包

5.更新軟體包:

sudo apt-get upgrade