【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
相关推荐
宇钶宇夕12 分钟前
S7-200 SMART 实战:自动包装控制系统的指令应用拆解
运维·自动化
MacroZheng12 分钟前
堪称一站式管理平台,同时支持Linux、MySQL、Redis、MongoDB可视化管理!
java·linux·后端
人生匆匆16 分钟前
openEuler 24.03 (LTS-SP2)简单KVM安装+桥接模式
linux·服务器·桥接模式
代码的余温34 分钟前
UNIX与Linux:五大核心差异解析
linux·服务器·unix
路溪非溪37 分钟前
Linux驱动如何向应用层提供sysfs操作接口
linux·arm开发·驱动开发
半桔39 分钟前
【Linux手册】信号量与建造者模式:以 PV 操作保证并发安全,分步组装构建复杂对象
linux·运维·安全·建造者模式
雷工笔记1 小时前
Linux系统学习之注意事项及命令基本格式
linux·运维·服务器
m0_464608261 小时前
Nginx SSL/TLS 配置
运维·nginx·ssl
秃头菜狗1 小时前
下载CentOS 7——从阿里云上下载不同版本的 CentOS 7
linux·阿里云·centos
胡萝卜的兔1 小时前
ssh域名过期,消息推送到企业微信
运维·ssh·企业微信