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
相关推荐
小武~17 小时前
嵌入式Linux系统性能优化:深入剖析I/O性能瓶颈
linux·运维·性能优化
dragoooon3417 小时前
[Linux——Lesson21.进程信号:信号概念 & 信号的产生]
linux·运维·服务器
头发还没掉光光17 小时前
Linux网络初始及网络通信基本原理
linux·运维·开发语言·网络·c++
爱和冰阔落17 小时前
【Linux工具链】从跨平台适配到一键部署:yum多架构支持+Vim远程编辑+gcc交叉编译,解决多场景开发效率瓶颈
linux·运维·vim
zzzsde18 小时前
【Linux】权限(2):文件权限的深入理解&&粘滞位
linux·运维·服务器
cws20040118 小时前
SQL Server 2008 群集配置指南(Windows 2008)-1
windows
序属秋秋秋18 小时前
《Linux系统编程之开发工具》【实战:倒计时 + 进度条】
linux·运维·服务器·c语言·c++·ubuntu·系统编程
刘某的Cloud20 小时前
ceph osd down排查
linux·运维·ceph·系统·osd
安审若无1 天前
图数据库neoj4安装部署使用
linux·运维·数据库
做运维的阿瑞1 天前
CentOS DNS故障排查完整解决方案:从症状到根因的系统化诊断
linux·运维·centos