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
相关推荐
万象.2 小时前
Linux传输层TCP,UDP相关内容
linux·tcp/ip·udp
MaximusCoder2 小时前
等保测评命令——Centos Linux
linux·运维·经验分享·python·安全·centos
万象.2 小时前
Linux数据链路层通信原理及报文格式
linux·网络·网络协议
卷Java3 小时前
Linux服务器Docker部署OpenClaw:腾讯云/阿里云/VPS安装避坑指南
linux·运维·服务器
鹓于3 小时前
手机SSH直连电脑运行iflow终极安全配置
windows·安全·ssh
Jackey_Song_Odd4 小时前
Part 1:Python语言核心 - 序列与容器
开发语言·windows·python
原来是猿5 小时前
Linux-【动静态库】
linux·运维·服务器
浪潮IT馆5 小时前
Windows 达梦 8(DM8)数据库完整安装教程 + 命令行导入 .dmp 文件完整指南
数据库·windows
NeilNiu6 小时前
Windows系统本地安装OpenClaw+飞书机器人
windows·机器人·飞书
九皇叔叔7 小时前
CentOS 7.5/RHEL 7.x 配置 YUM 源(阿里云镜像+本地源双方案)
linux·阿里云·centos