1. Ubuntu 24.04 换源
Ubuntu 24.04 将源的地址从 /etc/apt/sources.list 更换成 /etc/apt/sources.list.d/ubuntu.sources
换源步骤如下:
1. 备份原有的源
cd /etc/apt/sources.list.d
sudo cp ubuntu.sources ubuntu.sources.bak
2. 使用 vim 编辑源文件
sudo vim /etc/apt/sources.list.d/ubuntu.sources
在 vim 中删除原来所有的内容,粘帖如下文本内容(任选其一)。
阿里云的源:
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.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
换源后执行如下命令,来更新 Ubuntu 软件包的索引(元数据)
sudo apt update
准备就绪,可以使用 apt 命令来安装软件了,速度那叫一个快!