Ubuntu24.04LTS换源
发布时间 :
字数:314
阅读 :
今天给服务器重装了Ubuntu24.04LTS系统想着来尝尝鲜。
相信在座的各位安装好Ubuntu的第一件事一定是换源,那我也是这么想的。
按照Ubuntu22.04的老办法是行不通的,为啥呢,因为原来的 /etc/apt/sources.list
文件已经不管用了。

真正管用的文件是这个 /etc/apt/sources.list.d/ubuntu.sources
使用
1
| sudo vim /etc/apt/sources.list.d/ubuntu
|
命令去打开它
把默认的代码注释掉
可以换成以下的源
1 2 3 4 5 6
| # 阿里云 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
|
1 2 3 4 5 6 7
| #清华源 # 默认注释了源码镜像以提高 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
|
1 2 3 4 5 6
| #中科大源 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
|
1 2 3 4 5 6
| #网易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
|
随后按ESC
键,按:
,输入wq
保存关闭。
使用 sudo apt-get update && sudo apt-get upgrade -y
命令测试有无问题。
完事
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 [email protected]
文章标题:Ubuntu24.04LTS换源
字数:314
本文作者:许子晋
发布时间:2024-08-20, 11:35:49
最后更新:2025-06-08, 13:09:21
原始链接:https://xuzijin.com/2024/08/20/Change-source-with-Ubuntu24-04LTS/
版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。