老卫同学
发布于 2025-01-16 / 157 阅读
0
0

ubuntu24换源

4.04 源文件地址 已经更换为 /etc/apt/sources.list.d/ubuntu.sources

以更换阿里源为例,受限打开终端,输入以下命令,备份当前的源列表:

cp /etc/apt/sources.list.d/ubuntu.sources  /etc/apt/sources.list.d/ubuntu.sources.bak

打开文本编辑器,输入以下命令:

nano /etc/apt/sources.list.d/ubuntu.sources

在文本编辑器中粘贴以下内容:

阿里云

Types: deb
URIs: http://mirrors.aliyun.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

保存并关闭文本编辑器。

更新源列表,输入以下命令:

apt update

如果需要,可以更新系统软件包,输入以下命令:

apt upgrade

其他几份国内源如下:

清华源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

Types: deb
URIs: http://mirrors.tuna.tsinghua.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

中科大源

Types: deb
URIs: http://mirrors.ustc.edu.cn/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

网易163源

Types: deb
URIs: http://mirrors.163.com/ubuntu/
Suites: noble noble-updates noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg


评论