UPD 2020.2.26 目前 Ubuntu 20.04 LTS 還未發(fā)布, 教程僅適用于 development branch (不過這種教程應(yīng)該是通用的)
圖形界面操作 - 適用于 desktop 版本
在桌面右上角點擊打開菜單,點擊設(shè)置選項。

在設(shè)置選項右側(cè)下拉找到“關(guān)于”,點擊 Software Updates。

在軟件和更新界面里可以看到“下載自”,我們可以進(jìn)行修改。

推薦選擇 mirros.aliyun.com
或者 mirrors.tuna.tsinghua.edu.cn
,你也可以點擊選擇最佳服務(wù)器,測試連接最快的軟件源(測試時間較長)。

最后,退出軟件與更新界面時,會提示更新軟件列表信息,點擊重新載入即可。

終端操作 - 適用于 Server & Desktop 版本
首先我們需要備份原來的軟件源文件(防止改錯),然后刪除掉 sources.list
(因為我們要直接添加內(nèi)容)。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
使用你喜歡的文本編輯器,打開 sources.list
并加入如下內(nèi)容(你也可以把 mirrors.tuna.tsinghua.edu.cn
替換為自己喜歡的軟件源:
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security multiverse
刷新軟件源信息:
更新軟件,可以感受到更換國內(nèi)源之后速度的提升:
后記
文章還未更新完(畢竟 Ubuntu 20.04 LTS
還未正式發(fā)布)。
后續(xù)可能會加其他常用軟件的換源操作(相當(dāng)于把眾多教程集合起來,歡迎收藏)。
另外,不建議現(xiàn)在更新 Ubuntu 20.04
,更新的時候盡量不要選擇刪除不需要的軟件包,因為很有可能你之前的軟件就用到他們(比如搜狗輸入法(qt4
被拋棄了), 某s*r(python2
被拋棄了),N卡驅(qū)動等)。
到此這篇關(guān)于Ubuntu 20.04 apt 更換國內(nèi)源的實現(xiàn)方法的文章就介紹到這了,更多相關(guān)Ubuntu 20.04 apt 更換國內(nèi)源內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!