Ubuntu 22.04换国内源 清华源 阿里源 中科大源 163源

Ubuntu 22.04 LTS (Jammy Jellyfish) 的稳定版已经于 2022-04-21 日发布,代号:Jammy Jellyfish,默认内核版本 LTS kernel v5.15,是 Ubuntu 的第 9 个 LTS 版本,维护更新将提供 5 年,直到2027 年 4 月,Ubuntu官网下载地址:https://ubuntu.com/download/

如果你想在备用机器或虚拟机上测试它,你可以从 Ubuntu 的网站下载Ubuntu 22.04 每日构建版。
下载 Ubuntu 22.04 每日构建(不稳定)https://cdimage.ubuntu.com/daily-live/current/

国内有很多Ubuntu的镜像源,有阿里的、网易的,教育网的比如:清华源、中科大源。

这里以网易163源为例看一下如何修改Ubuntu 22.04的默认源。

第一步:备份源文件:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

第二步:编辑 /etc/apt/sources.list 文件

在文件最前面添加以下条目(操作前请做好相应备份):
vi /etc/apt/sources.list

网易163源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
# 预发布软件源,不建议启用
deb-src http://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse

第三步:执行更新命令:

sudo apt-get update
sudo apt-get upgrade

常用国内源:

阿里云源

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

清华源

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

中科大源

deb https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse

done!

出处:www.l1mn.com

原文标题:Ubuntu 22.04换国内源 清华源 阿里源 中科大源 163源

原文地址:https://www.l1mn.com/p/vaxdf3.html

本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。

分类:服务器linux
评论

皖ICP备2023023451号

Copyright © L1MN.COM 联系方式:l1mnfw@163.com