Ubuntu2404修改国内镜像

文章目录

  • [1 备份原文件](#1 备份原文件)
  • [2 修改文件内容](#2 修改文件内容)

Ubuntu2404修改国内镜像

2404和2204修改镜像的方式不一致

且镜像保存的位置也不一致,位置在/etc/apt/source.list.d/ubuntu.sources

参考:https://blog.csdn.net/Kiffy_Yam/article/details/145876447

1 备份原文件

shell 复制代码
sudo cp /etc/apt/source.list.d/ubuntu.sources /etc/apt/source.list.d/ubuntu.sources.bak

2 修改文件内容

shell 复制代码
sudo vim /etc/apt/source.list.d/ubuntu.sources

修改内容为

shell 复制代码
Types: deb
URIs: https://mirrors.aliyun.com/ubuntu/
Suites: noble noble-security noble-updates noble-proposed noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

# 以下内容注释

## Ubuntu security updates. Aside from URIs and Suites,
## this should mirror your choices in the previous section.
# Types: deb
# URIs: http://security.ubuntu.com/ubuntu/
# Suites: noble-security
# Components: main universe restricted multiverse
# Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

注意是 https

更新

shell 复制代码
sudo apt update
相关推荐
Sheffield6 小时前
Alpine是什么,为什么是Docker首选?
linux·docker·容器
Johny_Zhao1 天前
centos7安装部署openclaw
linux·人工智能·信息安全·云计算·yum源·系统运维·openclaw
haibindev1 天前
在 Windows+WSL2 上部署 OpenClaw AI员工的实践与踩坑
linux·wsl2·openclaw
0xDevNull2 天前
Linux切换JDK版本详细教程
linux
进击的丸子2 天前
虹软人脸服务器版SDK(Linux/ARM Pro)多线程调用及性能优化
linux·数据库·后端
Johny_Zhao4 天前
OpenClaw安装部署教程
linux·人工智能·ai·云计算·系统运维·openclaw
chlk1235 天前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑5 天前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件5 天前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux