溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

Ubuntu中如何更換國內(nèi)源

發(fā)布時間:2022-10-27 09:50:40 來源:億速云 閱讀:223 作者:iii 欄目:服務(wù)器

這篇文章主要介紹了Ubuntu中如何更換國內(nèi)源的相關(guān)知識,內(nèi)容詳細(xì)易懂,操作簡單快捷,具有一定借鑒價值,相信大家閱讀完這篇Ubuntu中如何更換國內(nèi)源文章都會有所收獲,下面我們一起來看看吧。

圖形界面操作 - 適用于 desktop 版本

在桌面右上角點擊打開菜單,點擊設(shè)置選項。

Ubuntu中如何更換國內(nèi)源

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

Ubuntu中如何更換國內(nèi)源

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

Ubuntu中如何更換國內(nèi)源

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

Ubuntu中如何更換國內(nèi)源

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

Ubuntu中如何更換國內(nèi)源

終端操作 - 適用于 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

刷新軟件源信息:

sudo apt update

更新軟件,可以感受到更換國內(nèi)源之后速度的提升:

sudo apt upgrade

關(guān)于“Ubuntu中如何更換國內(nèi)源”這篇文章的內(nèi)容就介紹到這里,感謝各位的閱讀!相信大家對“Ubuntu中如何更換國內(nèi)源”知識都有一定的了解,大家如果還想學(xué)習(xí)更多知識,歡迎關(guān)注億速云行業(yè)資訊頻道。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI