简介
Ubuntu作为广泛使用的Linux发行版,其默认的镜像源可能因为地理位置和网络问题导致下载速度缓慢,本文将指导用户如何根据自己所在的地理位置,选择并设置最适合的国内镜像源,需要的朋友可以参考下,
Ubuntu作为广泛使用的Linux发行版,其默认的镜像源可能因为地理位置和网络问题导致下载速度缓慢。本文将指导用户如何根据自己所在的地理位置,选择并设置最适合的国内镜像源。
使用命令 lsb_release -a
查询自己的系统版本号
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
这个发行版代号, Ubuntu的每个发行版都拥有一个独特的代号,开发代号需要与镜像源对应。
(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
(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
到此这篇关于Ubuntu设置国内镜像的全部流程的文章就介绍到这了,更多相关Ubuntu设置镜像内容请搜索腾创网以前的文章或继续浏览下面的相关文章希望大家以后多多支持腾创网!
以上本篇文章的全部内容了,感兴趣的小伙伴可以看看,更多精彩内容关注腾创网www.tengchuangw.com
© 版权声明
本站提供的资源,都来自网络,版权争议与本站无关,所有内容及软件的文章仅限用于学习和研究目的。不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负,我们不保证内容的长久可用性,通过使用本站内容随之而来的风险与本站无关,您必须在下载后的24个小时之内,从您的电脑/手机中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。侵删请致信E-mail: 571533527@qq.com
THE END
暂无评论内容