|
一、源文件位置
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
复制代码 通常刚安装的ubuntu22.04系统默认的源配置文件内容如下所示:
- Types: deb
- URIs: http://archive.ubuntu.com/ubuntu/
- Suites: noble noble-updates noble-backports
- Components: main restricted universe multiverse
- Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
- Types: deb
- URIs: http://security.ubuntu.com/ubuntu/
- Suites: noble-security
- Components: main restricted universe multiverse
- Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
复制代码 3. 修改为清华源配置(原Ubuntu源注释掉或者删除掉)
- 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.ustc.edu.cn/ubuntu/
- Suites: 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.aliyun.com/ubuntu/
- Suites: 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
- Types: deb
- URIs: http://mirrors.163.com/ubuntu/
- Suites: noble-security
- Components: main restricted universe multiverse
- Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
复制代码
|
|