当前位置:   article > 正文

Debian 11如何换源?_debian11换源

debian11换源

Debian 11如何换源?

一、备份原文件

mv /etc/apt/sources.list /etc/apt/sources.list.backup
  • 1

二、将默认源更换为THU的源

使用tee将输入重定向追加至/etc/apt/sources.list 文件

tee -a /etc/apt/sources.list <<  EOF
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src https://security.debian.org/debian-security bullseye-security main contrib non-free
EOF
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

三、验证源是否可用

apt update       
# -qq 静默输出   
apt update -qq  
  • 1
  • 2
  • 3

验证完成,效果图如下:
在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/172343
推荐阅读
相关标签
  

闽ICP备14008679号