ubuntu24.04添加apt源的方法和文件位置相对于以前的版本有变化,从原来的/etc/apt/sources.list文件更换到/etc/apt/sources.list.d/ubuntu.sources文件中。
我们先来看看ubuntu24.04 apt源中默认的配置。
cat /etc/apt/sources.list.d/ubuntu.sources | grep -iE -v '^($|#)'
Types: deb
URIs: http://cn.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
我们可以看到有两组相似的deb,一般情况我们只需要修改上面那一组。
下面就是常用的国内apt源
1.清华源
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
2.阿里源
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
3.网易源
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
4.中科大源
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
选上述一种源替换到/etc/apt/sources.list.d/ubuntu.sources文件中上面一块即可,然后更新环境即可
apt update
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://sulao.cn/post/1081
相关推荐
- ubuntu修改grub引导切换到指定内核的方法
- ubuntu使用nvbandwidth测试单节点gpu带宽性能
- ubuntu下使用qperf工具测试RDMA网络带宽和延迟
- ubuntu22.04关闭自动更新和禁止unattended-upgrades服务开机启动
- ubuntu22.04使用nccl-tests进行单机多卡通信测试
- ubuntu22.04编译安装hwloc/libevent/ucx/openpmix/openmpi
- ubuntu安装openvpn并配置连接
- ubuntu22.04使用gpu-burn进行gpu显卡测试
- ubuntu24.04使用deepin-wine安装企业微信
- ubuntu在线安装mysql8无法使用账户密码登陆的问题
评论列表