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
相关推荐
花嫁代二娃36 分钟前
Linux:环境变量
linux
斜月三5 小时前
windows部署多实例filebeat监控相同路径下文件
windows·filebeat
l1x1n06 小时前
Vim 编辑器常用操作详解(新手快速上手指南)
linux·编辑器·vim
ajassi20007 小时前
开源 python 应用 开发(三)python语法介绍
linux·python·开源·自动化
o不ok!7 小时前
Linux面试问题-软件测试
linux·运维·服务器
DaxiaLeeSuper8 小时前
Prometheus+Grafana+node_exporter监控linux服务器资源的方案
linux·grafana·prometheus
尽兴-9 小时前
如何将多个.sql文件合并成一个:Windows和Linux/Mac详细指南
linux·数据库·windows·sql·macos
kfepiza9 小时前
Netplan 中 bridges、bonds、ethernets、vlans 之间的关系 笔记250711
linux·tcp/ip·shell
小小不董9 小时前
深入理解oracle ADG和RAC
linux·服务器·数据库·oracle·dba
小宋00110 小时前
在Ubuntu上安装配置 LLaMA-Factory
ubuntu·计算机视觉