【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
相关推荐
做一个AC梦13 分钟前
Docker安装失败:Docker Desktop installation failed
运维·docker·容器
Shan120514 分钟前
浅谈Docker Kicks in的应用
运维·docker·容器
BD_Marathon1 小时前
Ubuntu:Mysql服务器
服务器·mysql·ubuntu
CodeWithMe3 小时前
【Note】《深入理解Linux内核》 Chapter 15 :深入理解 Linux 页缓存
linux·spring·缓存
0wioiw03 小时前
Ubuntu基础(监控重启和查找程序)
linux·服务器·ubuntu
Tipriest_3 小时前
Ubuntu常用的软件格式deb, rpm, dmg, AppImage等打包及使用方法
linux·运维·ubuntu
GBXLUO3 小时前
windows的vscode无法通过ssh连接ubuntu的解决办法
vscode·ubuntu
真智AI3 小时前
利用 Claude Opus 4 自动化 GitHub 工作流:从安装到实战详解
运维·自动化·github
胡斌附体4 小时前
linux测试端口是否可被外部访问
linux·运维·服务器·python·测试·端口测试·临时服务器
愚润求学4 小时前
【Linux】自旋锁和读写锁
linux·运维