Ubuntu20.04 LTS修改映象源
阿新 • • 發佈:2021-07-09
Ubuntu 的軟體源配置檔案是/etc/apt/sources.list
。將系統自帶的該檔案做個備份,將該檔案替換為下面內容,即可使用 TUNA 的軟體源映象。
備份Debian預設的源地址
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
執行vim /etc/apt/sources.list將下方程式碼替換原來的程式碼:
vim /etc/apt/sources.list
gedit /etc/apt/sources.list
# 預設註釋了原始碼映象以提高 apt update 速度,如有需要可自行取消註釋 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse # 預釋出軟體源,不建議啟用 # deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
修改好後執行sudo apt-get update更新源
sudo apt-get update