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
相关推荐
sky北城1 小时前
linux基本系统服务——DNS服务
linux·运维·服务器
心一信息4 小时前
如何在Ubuntu上部署excalidraw
linux·运维·ubuntu
人生匆匆5 小时前
linux ext4缩容home,扩容根目录
linux·运维·服务器
Linux技术芯5 小时前
#Linux内存管理#缺页中断处理的核心函数是do_page_fault()的工作原理
linux
yuanzhengme6 小时前
Shell【脚本 02】离线安装配置Zookeeper及Kafka并添加service服务和开机启动(脚本分析)
linux·zookeeper·kafka·自动化·安装脚本
Johny_Zhao6 小时前
阿里云平台健康检查巡检清单-运维篇
linux·网络安全·阿里云·信息安全·云计算·shell·系统运维
来自于狂人7 小时前
CentOS 镜像源配置与 EOL 后的应对策略
linux·运维·centos
博语小屋7 小时前
进程初识之进程状态
linux
吉凶以情迁8 小时前
window服务相关问题探索 go语言服务开发探索调试
linux·服务器·开发语言·网络·golang
柏木乃一9 小时前
Linux初步认识与指令与权限
linux·运维·服务器·shell·权限