【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
相关推荐
jingyu飞鸟13 分钟前
linux系统源代码安装apache、编译隐藏版本号
linux·运维·apache
世事如云有卷舒17 分钟前
Ubunt20.04搭建GitLab服务器,并借助cpolar实现公网访问
linux·服务器·gitlab
2401_858286111 小时前
OS15.【Linux】gdb调试器的简单使用
linux·运维·服务器·开发语言·gdb
c30%003 小时前
内网渗透——红日靶场五
运维·服务器
zjw_rp3 小时前
centos停止维护后更换yum源
linux·运维·centos
宇钶宇夕3 小时前
EPLAN 电气制图:建立自己的部件库,添加部件-加SQL Server安装教程(三)上
运维·服务器·数据库·程序人生·自动化
susu10830189114 小时前
Debian 11 Bullseye 在线安装docker
运维·docker·debian
行止64 小时前
OpenStack云平台管理
linux·openstack
love530love4 小时前
Docker 稳定运行与存储优化全攻略(含可视化指南)
运维·人工智能·windows·docker·容器
岁岁岁平安4 小时前
CentOS-7-x86_64解决:使用NAT模式无法ping通www.baidu.com或无法ping 8.8.8.8问题。
linux·运维·centos·centos-7