当前位置:首页文章笔记服务运维ubuntu22.04 更换阿里/清华软件源的方法

ubuntu22.04 更换阿里/清华软件源的方法

Ubuntu 22.04 中更换软件源可以提高软件下载速度,以下是具体步骤:

  1. 首先备份当前的源列表:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
  1. 编辑源列表文件:
sudo nano /etc/apt/sources.list
  1. 清空文件内容,然后根据需要添加国内源(以下是几个常用的国内源):

阿里云源

deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse

清华大学源

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ jammy-proposed main restricted universe multiverse
  1. 保存文件并退出(按Ctrl+O保存,Ctrl+X退出)
  2. 更新源使设置生效:
sudo apt update
  1. (可选)升级系统已安装的软件包:
sudo apt upgrade -y

选择源时,建议根据你的地理位置选择速度较快的源。如果更换源后出现问题,可以通过备份文件恢复原来的源设置:

sudo cp /etc/apt/sources.list.bak /etc/apt/sources.list
温馨提示:

文章标题:ubuntu22.04 更换阿里/清华软件源的方法

文章链接:https://www.wuyanshuo.cn/19600.html

更新时间:2025年08月07日

本站资源均为两层压缩,第一层7z(后缀若为wys,请自行修改为7z)有解压密码;第二层zip或cbz,无解压密码,可直接使用漫画类软件程序查看;详情可参考解压教程

本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:service@wuyanshuo.cn我们将第一时间处理! 资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。 所有资源仅限于参考和学习,版权归原作者所有,更多请阅读无言说网络服务协议

给TA打赏
共{{data.count}}人
人已打赏
服务运维

Debian系统出现vi编辑器无法正常使用和粘贴的解决方法。

2025-6-28 13:13:09

服务运维

Ubuntu 修改时区的几种方法

2025-8-26 10:53:31

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索