【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
相关推荐
Andy杨2 小时前
20250718-1-Kubernetes 应用程序生命周期管理-应用部署、升级、弹性_笔记
linux·docker·容器
写写闲篇儿5 小时前
Python+MongoDB高效开发组合
linux·python·mongodb
一个龙的传说6 小时前
linux 常用命令
linux·服务器·zookeeper
别致的影分身8 小时前
Docker 镜像原理
运维·docker·容器
路人蛃8 小时前
通过国内扣子(Coze)搭建智能体并接入discord机器人
人工智能·python·ubuntu·ai·aigc·个人开发
庸子8 小时前
Ansible & AWX 自动化运维
运维·自动化·ansible
Ching·8 小时前
esp32使用ESP-IDF在Linux下的升级步骤,和遇到的坑Traceback (most recent call last):,及解决
linux·python·esp32·esp_idf升级
斯是 陋室8 小时前
在CentOS7.9服务器上安装.NET 8.0 SDK
运维·服务器·开发语言·c++·c#·云计算·.net
子柒s9 小时前
Linux 基础
linux