Ubuntu設(shè)置國內(nèi)鏡像的全部流程
01.簡介
Ubuntu作為廣泛使用的Linux發(fā)行版,其默認的鏡像源可能因為地理位置和網(wǎng)絡(luò)問題導致下載速度緩慢。本文將指導用戶如何根據(jù)自己所在的地理位置,選擇并設(shè)置最適合的國內(nèi)鏡像源。
02.查詢版本
使用命令 lsb_release -a
查詢自己的系統(tǒng)版本號
icai@CSJMOVE:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy icai@CSJMOVE:~$
注意Codename
這個發(fā)行版代號, Ubuntu的每個發(fā)行版都擁有一個獨特的代號,開發(fā)代號需要與鏡像源對應(yīng)。
03.鏡像源(阿里云)
(1)ubuntu 14.04 LTS (trusty) (EOL)
deb https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse ## Not recommended # deb https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
(2)ubuntu 16.04 LTS (xenial) (EOL)
deb https://mirrors.aliyun.com/ubuntu/ xenial main deb-src https://mirrors.aliyun.com/ubuntu/ xenial main deb https://mirrors.aliyun.com/ubuntu/ xenial-updates main deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates main deb https://mirrors.aliyun.com/ubuntu/ xenial universe deb-src https://mirrors.aliyun.com/ubuntu/ xenial universe deb https://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb-src https://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb https://mirrors.aliyun.com/ubuntu/ xenial-security main deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security main deb https://mirrors.aliyun.com/ubuntu/ xenial-security universe deb-src https://mirrors.aliyun.com/ubuntu/ xenial-security universe
(3)ubuntu 18.04 LTS (bionic)
deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
(4)ubuntu 20.04 LTS (focal)
deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse ```(5)ubuntu 22.04 LTS (jammy) ```Shell deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
(5) ubuntu 23.04 (lunar)
deb https://mirrors.aliyun.com/ubuntu/ lunar main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ lunar main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ lunar-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ lunar-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ lunar-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ lunar-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ lunar-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ lunar-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ lunar-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ lunar-backports main restricted universe multiverse
(6)ubuntu 24.04 (noble)
deb https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-security main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-updates main restricted universe multiverse # deb https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse # deb-src https://mirrors.aliyun.com/ubuntu/ noble-proposed main restricted universe multiverse deb https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse deb-src https://mirrors.aliyun.com/ubuntu/ noble-backports main restricted universe multiverse
04.設(shè)置方法
(1)備份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.back
(2)編輯
vim /etc/apt/sources.list
(3)更新
sudo apt update sudo apt upgrade
到此這篇關(guān)于Ubuntu設(shè)置國內(nèi)鏡像的全部流程的文章就介紹到這了,更多相關(guān)Ubuntu設(shè)置鏡像內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
CentOS7環(huán)境搭建python3以及與python2實現(xiàn)共存的方法
這篇文章主要介紹了CentOS7環(huán)境搭建python3以及與python2實現(xiàn)共存的方法,結(jié)合實例形式簡單分析了CentOS7環(huán)境下安裝Python3的步驟、命令及測試代碼示例,非常簡單易懂,需要的朋友可以參考下2018-06-06PHP程序員玩轉(zhuǎn)Linux系列 nginx初學者引導
這篇文章主要為大家詳細介紹了PHP程序員玩轉(zhuǎn)Linux系列文章,帶大家初步認識一下nginx,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-04-04Linux利用lsof/extundelete工具恢復誤刪除的文件或目錄
這篇文章主要給大家介紹了關(guān)于Linux利用lsof/extundelete工具恢復誤刪除的文件或目錄的相關(guān)資料,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-08-08