上一篇 下一篇 分享链接 返回 返回顶部

Ubuntu换源方法(22.04也能用)

发布人:樱雨云网络工程师 发布时间:2024-10-08 19:25 阅读量:733

配置文件路径

/etc/apt/sources.list

修改配置文件

备份文件

将sources.list备份保存为sources.backup.list,以防止有需要的时候更换回来。

 

cp /etc/apt/sources.list

查看ubuntu版本

cat /etc/issue

修改配置

vi /etc/apt/sources.list

清华镜像源

清华源镜像地址

 

ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

ubuntu 使用帮助 | 镜像站使用帮助 | 清华大学开源软件镜像站,致力于为国内和校内用户提供高质量的开源软件镜像、Linux 镜像源服务,帮助用户更方便地获取开源软件。本镜像站由清华大学 TUNA 协会负责运行维护。

https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/

 

22.04LTS

 

########   Ubuntu22.04LTS 清华镜像源   ###############

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse

# deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse

21.10

 

########   Ubuntu21.10 清华镜像源   ###############

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-updates main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-backports main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-security main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-security main restricted universe multiverse

 

# 预发布软件源,不建议启用

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-proposed main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ impish-proposed main restricted universe multiverse

20.04LTS

 

########   Ubuntu20.04LTS 清华镜像源   ###############

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

 

# 预发布软件源,不建议启用

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

18.04LTS

 

########   Ubuntu18.04LTS 清华镜像源   ###############

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse

 

# 预发布软件源,不建议启用

# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

阿里云镜像源

阿里云镜像地址

 

ubuntu镜像_ubuntu下载地址_ubuntu安装教程-阿里巴巴开源镜像站

阿里巴巴开源镜像站为您提供免费的ubuntu下载地址及ubuntu安装教程,ubuntu镜像简介:Ubuntu,是一款基于 Debian Linux 的以桌面应用为主的操作系统,内容涵盖文字处理、电子邮件、软件开发工具和 Web 服务等,可供用户免费下载、使用和分享。Ubuntu 提供了一个健壮、功能丰富的计算环境,既适合家庭使用又适用于商业环境,为用户带来了了尽善尽美的使用体验。阿里巴巴开源镜像站,持续同步 Ubuntu、Ubuntu-ports 等最新版镜像文件,为开发者提供极致的下载体验。阿里巴巴开源镜像站

https://developer.aliyun.com/mirror/ubuntu?spm=a2c6h.13651102.0.0.4c4f1b11ecGrCF

 

22.04LTS

 

########   Ubuntu22.04 阿里云镜像源   ###############

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

20.04

 

########   Ubuntu20.04 阿里云镜像源   ###############

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

18.04

 

########   Ubuntu18.04 阿里云镜像源   ###############

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

16.04

 

########   Ubuntu16.04 阿里云镜像源   ###############

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

中科大源镜像

22.04

 

########   Ubuntu22.04 中科大镜像源   ###############

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

网易163源镜像

22.04

 

########   Ubuntu22.04 网易163镜像源   ###############

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-proposed 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-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 # 更新本地软件

————————————————

                        

原文链接:https://blog.csdn.net/qq_14931165/article/details/126863871

目录结构
全文
关于Centos官网停止维护导致源失效解决方案,及部分通知。

我司产品均不限制流量!严厉禁止CDN/PCDN/VPN/算力/挖矿等其他购物页标注的违规事项  系统会自动识别和取证,发现一例封禁一例,从严处理。

我司正价机器终身承诺:不超开硬盘IO/内存条/不限制流量

QQ售前交流群:559442949,老群由于建群人员非官方人员,给各位造成了不良影响,我们深表歉意!同时群内出现:跑路等 不良词语属虚假信息,请勿当真!以官网为准,感谢各位理解与支持!

经过我司运维团队和技术团队研究,将在3日对公益款产品进行优化,以提升稳定性/可用性
公益机器除开网络波动等原因,以在线运行45天。

公益款禁止长期大占用CPU/IO/带宽否则会出现严重不稳定,我司对此概不负责。
导致CentOS系统源已全面失效,比如安装宝塔等等会出现网络不可达等报错,解决方案是更换系统源。输入以下命令:


bash <(curl -sSL https://linuxmirrors.cn/main.sh)

活动区产品均为峰值带宽,未标注独享的也均为峰值带宽。峰值带宽不能保证带宽随时达标,不接受以带宽为由的售后要求和说辞。通知查看即为通知到位,未查询通知的禁止购买产品。

我确认阅读并且同意 关闭
网站通知