【ubuntu改源】

ubuntu改源

备份原始源

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

查看ubuntu发行版本

bash 复制代码
lsb_release -a

arm64 noble版本的源

清华源

vim修改源

bash 复制代码
esc :1,$d # 删除所有
复制代码
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-backports main restricted universe multiverse

# 以下安全更新软件源包含了官方源与镜像站配置,如有需要可自行修改注释切换
deb http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse
# deb-src http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-proposed main restricted universe multiverse
# # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ noble-proposed main restricted universe multiverse

更新系统软件源

bash 复制代码
# sudo apt update 是一个在基于 Debian 的 Linux 发行版(如 Ubuntu)中使用的命令
# 它用于更新本地软件包索引数据库。这个命令不会实际安装或升级任何软件包
# 但它会检查配置的软件源(通常位于 /etc/apt/sources.list 文件和 /etc/apt/sources.list.d/ 目录下的文件中)
# 以获取最新的软件包列表和版本信息。
sudo apt-get update
相关推荐
AI小小怪1 小时前
在Linux服务器上安装CVAT (Docker 28.5.1)
运维·docker·容器·数据标注·cvat
KYGALYX4 小时前
在Linux中备份msyql数据库和表的详细操作
linux·运维·数据库
余—笙5 小时前
Linux(docker)安装搭建CuteHttpFileServer/chfs文件共享服务器
linux·服务器·docker
lang201509285 小时前
Linux高效备份:tar与gzip完全指南
linux·运维·服务器
IDOlaoluo5 小时前
OceanBase all-in-one 4.2.0.0 安装教程(CentOS 7/EL7 一键部署详细步骤)
linux·centos·oceanbase
wanhengidc6 小时前
云手机的基本原理
运维·服务器·游戏·智能手机·云计算
篙芷6 小时前
两台服务器 NFS 共享目录实战
运维·服务器
catoop6 小时前
在 WSL 的 Ubuntu 中安装和配置 SSH 服务
linux·ubuntu·ssh
Hard but lovely6 小时前
linux: centos 软件包管理 yum源
linux·运维·centos
悲伤小伞7 小时前
Linux_Socket_UDP
linux·服务器·网络·c++·网络协议·udp