Ubuntu 20.04 apt 更換國(guó)內(nèi)源的實(shí)現(xiàn)方法
UPD 2020.2.26 目前 Ubuntu 20.04 LTS 還未發(fā)布, 教程僅適用于 development branch (不過(guò)這種教程應(yīng)該是通用的)
圖形界面操作 - 適用于 desktop 版本
在桌面右上角點(diǎn)擊打開(kāi)菜單,點(diǎn)擊設(shè)置選項(xiàng)。
在設(shè)置選項(xiàng)右側(cè)下拉找到“關(guān)于”,點(diǎn)擊 Software Updates。
在軟件和更新界面里可以看到“下載自”,我們可以進(jìn)行修改。
推薦選擇 mirros.aliyun.com
或者 mirrors.tuna.tsinghua.edu.cn
,你也可以點(diǎn)擊選擇最佳服務(wù)器,測(cè)試連接最快的軟件源(測(cè)試時(shí)間較長(zhǎng))。
最后,退出軟件與更新界面時(shí),會(huì)提示更新軟件列表信息,點(diǎn)擊重新載入即可。
終端操作 - 適用于 Server & Desktop 版本
首先我們需要備份原來(lái)的軟件源文件(防止改錯(cuò)),然后刪除掉 sources.list
(因?yàn)槲覀円苯犹砑觾?nèi)容)。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
使用你喜歡的文本編輯器,打開(kāi) 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
刷新軟件源信息:
sudo apt update
更新軟件,可以感受到更換國(guó)內(nèi)源之后速度的提升:
sudo apt upgrade
后記
文章還未更新完(畢竟 Ubuntu 20.04 LTS
還未正式發(fā)布)。
后續(xù)可能會(huì)加其他常用軟件的換源操作(相當(dāng)于把眾多教程集合起來(lái),歡迎收藏)。
另外,不建議現(xiàn)在更新 Ubuntu 20.04
,更新的時(shí)候盡量不要選擇刪除不需要的軟件包,因?yàn)楹苡锌赡苣阒暗能浖陀玫剿麄儯ū热缢压份斎敕ǎ?code>qt4被拋棄了), 某s*r(python2
被拋棄了),N卡驅(qū)動(dòng)等)。
到此這篇關(guān)于Ubuntu 20.04 apt 更換國(guó)內(nèi)源的實(shí)現(xiàn)方法的文章就介紹到這了,更多相關(guān)Ubuntu 20.04 apt 更換國(guó)內(nèi)源內(nèi)容請(qǐng)搜索本站以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持本站!
版權(quán)聲明:本站文章來(lái)源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來(lái)源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來(lái)源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來(lái),僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。