当前位置: 代码网 > it编程>游戏开发>ar > Ubuntu24.04换源方法(新版源更换方式,包含Arm64)

Ubuntu24.04换源方法(新版源更换方式,包含Arm64)

2024年08月06日 ar 我要评论
Ubuntu24.04换源

一、源文件位置

ubuntu24.04的源地址配置文件发生改变,不再使用以前的sources.list文件,升级24.04之后,而是使用如下文件

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

二、开始换源

1. 备份源配置文件

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

2. 编辑源配置文件

sudo vim /etc/apt/sources.list.d/ubuntu.sources

通常刚安装的ubuntu24.04系统默认的源配置文件内容如下所示:
在这里插入图片描述

3. 添加清华源配置

清华源
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

添加后结果如下:

在这里插入图片描述

4. 更新

sudo apt-get update
sudo apt-get upgrade

三、其它源

中科大源

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

阿里源

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

网易源

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

四、arm64-ubuntu配置(2024-0723补充)

只需在ubuntu后面添加-ports即可。

types: deb
uris: http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/
suites: noble noble-updates noble-security
components: main restricted universe multiverse
signed-by: /usr/share/keyrings/ubuntu-archive-keyring.gpg

(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com