Ubuntu24.04更换国内源

Title Ubuntu24.04更换国内源
Framework Ubuntu
User wy8817399@vip.qq.com
Id 23
Created 1/13/26, 9:27 AM
Modified 4/16/26, 1:46 PM
Published Yes
Content

1、切换到下面目录

cd /etc/apt/sources.list.d

 

2、修改源文件

sudo vim ubuntu.sources

 

3、替换以下清华镜像源,原来的可以删除

Types: deb
URIs: https://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: https://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: https://repo.huaweicloud.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: https://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 update
sudo apt -y upgrade