
Ubuntu24.04换源方法(新版源更换方式)
Ubuntu24.04换源方法(新版源更换方式)
一、源文件位置
Ubuntu24.04的源地址配置文件发生改变,不再使用以前的sources.list文件,而是如下文件:
/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
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
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 Jie
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果