当前位置: 首页 > news >正文

Ubuntu(20.04 LTS)更换镜像源

此换镜像源方法只适用x86_64架构的系统,其他架构的系统参考ubuntu-ports的方法

1、备份文件

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bk

2、创建新文件 

sudo vi /etc/apt/sources.list

根据自己系统版本选择下面对应的镜像源添加到新文件中(记得保存再退出

版本代号可用lsb_release -a 查看

 ubuntu 14.04 LTS (trusty) (EOL)

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty-proposed main restricted universe multiverse

ubuntu 16.04 LTS (xenial) (EOL)

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse

ubuntu 18.04 LTS (bionic) 

# 默认注释了源码镜像以提高 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 http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/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 20.04 LTS (focal) 

# 默认注释了源码镜像以提高 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 http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/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

ubuntu 22.04 LTS (jammy)

# 默认注释了源码镜像以提高 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 http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/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

ubuntu 23.04 (lunar)

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ lunar-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ lunar-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ lunar-proposed main restricted universe multiverse

 ubuntu 23.10 (mantic)

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ mantic-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ mantic-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ mantic-proposed main restricted universe multiverse

ubuntu 24.04 (noble)

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-backports main restricted universe multiverse# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse
# deb-src http://security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ noble-proposed main restricted universe multiverse

其他镜像源:

阿里云 

 中科大源

3、更新软件包及系统 

sudo apt-get update
sudo apt-get upgrade -y

参考文档点这里 

 

相关文章:

Ubuntu(20.04 LTS)更换镜像源

此换镜像源方法只适用x86_64架构的系统,其他架构的系统参考ubuntu-ports的方法 1、备份文件 sudo mv /etc/apt/sources.list /etc/apt/sources.list.bk2、创建新文件 sudo vi /etc/apt/sources.list根据自己系统版本选择下面对应的镜像源添加到新文件中&#xf…...

golang使用 copier对象复制时进行类型转化

问题描述 在后端我们经常会在 entity 和 view 之间进行复制转换为可以发送给前端的数据 比如 time 对象在下送的时候,我们希望能显示经过格式化过的目标字符串格式,这里我们可以使用自定义的 converter,主要是定义 src 和 dst 类型&#xf…...

英特尔18A制程技术分析解读

#### 引言 尽管第二季度净亏损16亿美元以及大规模裁员计划引发了一些担忧,英特尔还是在8月6日宣布了其下一代18A制程技术取得重大里程碑的消息,并计划在2025年开始生产。 #### 技术进展 - **里程碑**:英特尔表示,这一里程碑是在…...

【百度面试算法题】2024-08-02

部门项目实际上也涉及到多种语言,有没有意愿去学习其他语言?你是如何利用数据结构来做技术的/项目中是如何解决高并发的?(没听懂问题…就直接开始介绍项目了…后来被打断说不进行发散了,开始问八股)说一下单…...

OSPF基础

目录 一、路由分类 1.直连路由 2.非直连路由 二、OSPF概述 1.什么是OSPF 2.OSPF的特点 3.OSPF的区域划分 1.划分区域的意义 2.区域的划分 三、OSPF 消息数据包 1.数据包的类型 2.Hello包 2.DBD包 3.LSR包 4.LSU 5.LSACK 四、OSPF 邻居状态机制 1.邻居关…...

leetcode 958.二叉树的完全性检验

1.题目要求: 给你一棵二叉树的根节点 root ,请你判断这棵树是否是一棵 完全二叉树 。在一棵 完全二叉树 中,除了最后一层外,所有层都被完全填满,并且最后一层中的所有节点都尽可能靠左。最后一层(第 h 层)…...

Spring 中请求作用域的数据存储在 ThreadLocal 中还是 Spring 容器中?

微信中阅读,欢迎👏👏👏关注公众号:CodeFit 。 创作不易,如果你觉得这篇文章对您有帮助,请不要忘了 点赞、分享 和 关注,为我的 持续创作 提供 动力! 最近看到一个有趣的问题,Request Scope(请求作用域) 的数据是存储在 ThreadLocal 中,还是 Spring 容器中? 事…...

基础岛 - 8G显存验证书生·浦语大模型的Demo

因为以前用过LMDeploy,所以本章的内容相对熟悉。 另外,因为教程写的很详细保姆级,所以大多数情况直接复制执行命令即可。开发机的创建略过。 总体验证结论: LMDeploy的模型加载有点慢,但推理速度快,符合预…...

Jangow靶机攻略

搭建jangow靶机环境https://download.vulnhub.com/jangow/jangow-01-1.0.1.ova 虚拟机载入镜像文件 1.扫描目标主机地址 2.打开靶机环境 3.输入id查看回显位置 4.编辑一句话木马注入echo <?php eval($_POST[cmd]);?> > test.php 5.接下来查看文件输入ls 6.使用工具…...

Vue项目通过宝塔部署之后,页面刷新后浏览器404页面

目录 报错 解决方法 报错 将vue项目在宝塔上部署&#xff0c; 当项目挂载到服务器上去&#xff0c;进行浏览器的访问&#xff0c;是能正常访问的&#xff0c;可是当我们在浏览器上进行刷新之后&#xff0c;浏览器会给我们返回一个404的页面。 解决方法 &#xff08;1&#…...

Java一一一简易图书管理系统

Java一一一简易图书管理系统 1. 需求分析 功能需求&#xff1a; 添加图书删除图书更新图书信息查询图书列出所有图书 2. 设计 实体类&#xff1a;Book业务逻辑类&#xff1a;LibraryManager 3. 实现 3.1 Book类 public class Book {private String id;private String t…...

Ubuntu配置carla docker环境

前言: 本文只在以下设备成功运行, 其他设备不保证能成功, 可以参考在自己设备进行配置 环境 ubuntu 20.04carla 0.9.15gpu 3060(notebook) 安装显卡驱动&nvidia-container-toolkit 显卡驱动 安装完成系统后直接在’软件和更新->附加驱动’直接选择470(proprietary…...

超越sd3!比肩Midjourney-v6?AI绘画大模型FLUX1.0详细评测与本地部署方法(附安装文件)

​ FLUX.1模型是什么&#xff1f; FLUX模型是一个开源的AI图像生成模型&#xff0c;由黑森林工作室研发。 堪比sd3以及Midjourney-v6 背景/backdrop 黑森林工作室&#xff08;Black Forest Labs&#xff09;由前Stability AI核心成员团队成立&#xff0c;专注于开发高级生成式…...

帆软填报报表单元格根据其它单元格内容决定另外的单元格可筛选什么值

效果图&#xff1a; 方法有三种&#xff1a; 方法一&#xff1a; 添加链接描述...

一键浪漫的回忆:微软开源的修复工具!!【送源码】

项目介绍 “Bringing-Old-Photos-Back-to-Life”是一款由微软开发的创新软件解决方案&#xff0c;它利用人工智能技术来修复和增强老旧照片的质量。这款工具可以解决老旧照片中常见的问题&#xff0c;如褪色、低分辨率以及物理损坏&#xff08;如划痕和撕裂&#xff09;。通过采…...

力扣-240.搜索二维矩阵(2)

刷力扣热题–第二十七天:240.搜索二维矩阵(2) 新手第二十七天 奋战敲代码&#xff0c;持之以恒&#xff0c;见证成长 1.题目简介 2.题目解答 这道题的想法就是,整体遍历,在遇到比target还大的,就停止这行的遍历,然后转过去继续遍历下一行,如果有一行的开头大于target,直接返回…...

Python推导式和生成器表达式

Python推导式 Python推导式是一种可以从一个数据序列构建另一个新的数据序列的结构体。 除了列表推导式 (list comprehension) 以外&#xff0c;还有字典(dict)、集合(set)推导式。它们的语法格式如下&#xff1a; # 列表&#xff1a;使用方括号 [expression for item in it…...

比较支持向量机、AdaBoost、逻辑斯谛回归模型的学习策略与算法

(1)支持向量机&#xff1a;SVM 是一种监督学习算法&#xff0c;用于分类和回归任务。 学习策略&#xff1a;间隔最大化 算法&#xff1a;最大间隔法、软间隔算法。 参数学习&#xff1a;参数学习过程是要最小化目标函数&#xff0c;通常通过优化算法&#xff08;如SMO&#x…...

Android顶部标题栏自定义,添加按钮

1. 先写一个标题栏的layout, 放在工程的res/layout下&#xff0c;如下: <?xml version"1.0" encoding"utf-8"?> <RelativeLayout xmlns:android"http://schemas.android.com/apk/res/android"android:layout_width"match_par…...

Spring Boot 整合 Dubbo3 + Nacos 2.4.0【进阶】+ 踩坑记录

上一篇文章中&#xff0c;Spring Boot 整合 Dubbo3 Nacos 2.4.0 进行了简单的集成使用&#xff0c;此文简单进阶并记录踩坑日常&#xff1b; Nacos 2.4.0 增加鉴权的配置Nacos 2.4.0 配置 MySQLNacos2.4.0 的热更新Dubbo3 自动负载Dubbo3 的重试和超时机制踩坑记录 一、Nacos…...

(二)TensorRT-LLM | 模型导出(v0.20.0rc3)

0. 概述 上一节 对安装和使用有个基本介绍。根据这个 issue 的描述&#xff0c;后续 TensorRT-LLM 团队可能更专注于更新和维护 pytorch backend。但 tensorrt backend 作为先前一直开发的工作&#xff0c;其中包含了大量可以学习的地方。本文主要看看它导出模型的部分&#x…...

全球首个30米分辨率湿地数据集(2000—2022)

数据简介 今天我们分享的数据是全球30米分辨率湿地数据集&#xff0c;包含8种湿地亚类&#xff0c;该数据以0.5X0.5的瓦片存储&#xff0c;我们整理了所有属于中国的瓦片名称与其对应省份&#xff0c;方便大家研究使用。 该数据集作为全球首个30米分辨率、覆盖2000–2022年时间…...

基于数字孪生的水厂可视化平台建设:架构与实践

分享大纲&#xff1a; 1、数字孪生水厂可视化平台建设背景 2、数字孪生水厂可视化平台建设架构 3、数字孪生水厂可视化平台建设成效 近几年&#xff0c;数字孪生水厂的建设开展的如火如荼。作为提升水厂管理效率、优化资源的调度手段&#xff0c;基于数字孪生的水厂可视化平台的…...

【决胜公务员考试】求职OMG——见面课测验1

2025最新版&#xff01;&#xff01;&#xff01;6.8截至答题&#xff0c;大家注意呀&#xff01; 博主码字不易点个关注吧,祝期末顺利~~ 1.单选题(2分) 下列说法错误的是:&#xff08; B &#xff09; A.选调生属于公务员系统 B.公务员属于事业编 C.选调生有基层锻炼的要求 D…...

拉力测试cuda pytorch 把 4070显卡拉满

import torch import timedef stress_test_gpu(matrix_size16384, duration300):"""对GPU进行压力测试&#xff0c;通过持续的矩阵乘法来最大化GPU利用率参数:matrix_size: 矩阵维度大小&#xff0c;增大可提高计算复杂度duration: 测试持续时间&#xff08;秒&…...

《基于Apache Flink的流处理》笔记

思维导图 1-3 章 4-7章 8-11 章 参考资料 源码&#xff1a; https://github.com/streaming-with-flink 博客 https://flink.apache.org/bloghttps://www.ververica.com/blog 聚会及会议 https://flink-forward.orghttps://www.meetup.com/topics/apache-flink https://n…...

Android第十三次面试总结(四大 组件基础)

Activity生命周期和四大启动模式详解 一、Activity 生命周期 Activity 的生命周期由一系列回调方法组成&#xff0c;用于管理其创建、可见性、焦点和销毁过程。以下是核心方法及其调用时机&#xff1a; ​onCreate()​​ ​调用时机​&#xff1a;Activity 首次创建时调用。​…...

探索Selenium:自动化测试的神奇钥匙

目录 一、Selenium 是什么1.1 定义与概念1.2 发展历程1.3 功能概述 二、Selenium 工作原理剖析2.1 架构组成2.2 工作流程2.3 通信机制 三、Selenium 的优势3.1 跨浏览器与平台支持3.2 丰富的语言支持3.3 强大的社区支持 四、Selenium 的应用场景4.1 Web 应用自动化测试4.2 数据…...

uniapp 集成腾讯云 IM 富媒体消息(地理位置/文件)

UniApp 集成腾讯云 IM 富媒体消息全攻略&#xff08;地理位置/文件&#xff09; 一、功能实现原理 腾讯云 IM 通过 消息扩展机制 支持富媒体类型&#xff0c;核心实现方式&#xff1a; 标准消息类型&#xff1a;直接使用 SDK 内置类型&#xff08;文件、图片等&#xff09;自…...

Python 高效图像帧提取与视频编码:实战指南

Python 高效图像帧提取与视频编码:实战指南 在音视频处理领域,图像帧提取与视频编码是基础但极具挑战性的任务。Python 结合强大的第三方库(如 OpenCV、FFmpeg、PyAV),可以高效处理视频流,实现快速帧提取、压缩编码等关键功能。本文将深入介绍如何优化这些流程,提高处理…...