Linux:配置Ubuntu系统的镜像软件下载地址

一、原理介绍

好处:从国内服务器下载APT软件,速度快。

二、配置

我这里配置的是清华大学的镜像服务器地址
https://mirrors.tuna.tsinghua.edu.cn/


1、备份文件

bash 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2、清空sources.list

bash 复制代码
echo '' > /etc/apt/sources.list
cat /etc/apt/sources.list

3、配置地址

bash 复制代码
# 默认注释了源码镜像以提高 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

4、更新apt软件

bash 复制代码
sudo apt-get update
相关推荐
小猿M4 分钟前
在Ubuntu中安装CRIU
ubuntu·criu
ITHAOGE1510 分钟前
下载 | Windows Server 2022官方原版ISO映像!(5月更新、标准版、数据中心版、20348.5139)
windows·科技·微软·电脑
不吃土豆的马铃薯24 分钟前
Socket 网络编程实战教程
linux·服务器·开发语言·网络·c++·算法
YJlio25 分钟前
CSDN AI数字营销实测体验:多平台账号一键分发到底好不好用?我做了一次完整实测
人工智能·windows·企业微信·火绒安全·系统备份·easyimagex
零号全栈寒江独钓30 分钟前
c++跨平台实现日志重定向
linux·c++·windows
爱莉希雅&&&44 分钟前
Zabbix监控初步搭建
linux·运维·数据库·mysql·zabbix
叠叠乐1 小时前
红米redmi k90 pro max alsc 冠军版刷TWRP
linux
oioihoii1 小时前
CentOS 7单机部署Elasticsearch:这些坑和关键配置,生产环境踩过才知道
linux·elasticsearch·centos
Crazy learner1 小时前
Windows 微软商店更新失败(错误代码 0x80004002)完整解决指南(2026最新有效)
windows·microsoft
愿天垂怜1 小时前
【C++脚手架】gtest 单元测试库的介绍与使用
linux·服务器·c++·gitee·前端框架·gtest