【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
相关推荐
vibecode3 小时前
网站服务器失去响应怎么解决?我把连接超时和读超时这两段计时拆开跑了一遍
运维·服务器
工业一体机老司机4 小时前
Docker部署工控机采集服务 Compose编排与开机自启
运维·docker·容器
迪康Defender4 小时前
终端供应链安全:应用白名单与软件正版化检测落地|终端安全治理实践
运维·服务器·网络·安全·web安全·自动化·运维开发
lzx_0025 小时前
Linux 进程(二) 深入理解进程
linux
沫璃染墨5 小时前
从零入门计算机网络系列(十二):HTTP长连接与会话管理详解——从Connection到Cookie与Session
linux·服务器·c++·tcp/ip·ubuntu·http·交互
温暖小土5 小时前
在 CentOS 上安装 Redis Stack
linux·redis·centos
GeW7 小时前
国产化替代进入深水区之后Linux 与数据库为什么必须走向重建
linux
万联WANFLOW7 小时前
异地厂区视频监控远程运维:从组网到安全的实施要点
运维·网络·安全·企业组网·sdwan
十碗饭吃不饱8 小时前
SSH 密钥认证详解:原理、实操、参数、排错与加固
运维·ssh
echoarts8 小时前
服务器连不上?FileZilla 改被动模式就好了
运维·服务器·其他