1. 程式人生 > 實用技巧 >linux ubuntu 系統修改源

linux ubuntu 系統修改源

用系統自帶的源安裝某些軟體實在是太慢了,因此需要換一個國內的源,這個下載速度會快非常多。

本文以阿里的源為例

Step 1:

sudo vim /etc/apt/sources.list

開啟 sources.list 檔案,刪除裡面的所有內容

Step 2:

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

上面的內容複製到 sources.list 檔案中,儲存並退出

Step 3:

更新

sudo apt update
sudo apt upgrade