Ubuntu操作系統(tǒng)更換國內(nèi)源過程
更新時間:2026年03月04日 16:50:50 作者:也言
文章介紹了如何將Ubuntu系統(tǒng)的軟件源更換為國內(nèi)的阿里源,包括備份原源列表、添加阿里源地址和公鑰、以及更新源和軟件版本的詳細步驟
Ubuntu更換國內(nèi)源
操作步驟
1. 對先前內(nèi)容進行備份
// 備份源內(nèi)容 (需要管理員權(quán)限) > sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2. 更換國內(nèi)源文
2.1 更換阿里源
// 阿里源 > echo "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src 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-backports main restricted universe multiverse" >> /etc/apt/sources.list

2.2 添加阿里公鑰
// 添加公鑰Key > sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32

3. 更新源及軟件版本
> sudo apt update -y > sudo apt upgrade -y

總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
Linux(ubuntu)下實現(xiàn)增加/刪除文件權(quán)限
下面小編就為大家分享一篇Linux(ubuntu)下實現(xiàn)增加/刪除文件權(quán)限,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-04-04
Ubuntu20.04沒有wifi的解決方案(Realtek版本)
本文介紹了如何在Ubuntu下手動安裝無線網(wǎng)卡驅(qū)動,避免了需要在Windows下查看網(wǎng)卡型號的麻煩,通過終端命令查看網(wǎng)卡型號,使用git下載驅(qū)動文件并將其放置在/lib/firmware/rtw89目錄下,然后激活相應內(nèi)核,最后重啟系統(tǒng)以解決沒有WiFi的問題2026-03-03
在Linux系統(tǒng)上查看Apache服務(wù)器的錯誤日志
這篇文章主要介紹了在Linux系統(tǒng)上查看Apache服務(wù)器的錯誤日志,是服務(wù)器運維必備的基礎(chǔ)知識,需要的朋友可以參考下2015-07-07
Linux中Docker遇到報port?is?already?allocated錯誤
在Linux系統(tǒng)中,如果嘗試綁定一個網(wǎng)絡(luò)服務(wù)到一個已經(jīng)被其他進程使用的端口上,你會遇到“port?is?already?allocated”錯誤,這意味著該端口已經(jīng)被另一個進程占用,因此無法再次被分配給任何新的服務(wù)2024-06-06

