Wsl安装debian13的时候我想换清华源。然后打开/etc/apt/sources.list一片空白怎么办?

Wsl安装debian13的时候我想换清华源。然后打开/etc/apt/sources.list一片空白怎么办?

您先确认一下,您用的是不是 DEB822 格式的软件源配置文件。

此外,您的问题不涉及 dwm,请勿悬挂 dwm 标签。

不行

我记得Debian(wsl)不是有默认的官方镜像源吗,如若没有自己手动添加清华源或中科大镜像源

官方源有点慢,我想换成清华源

可以先在 /etc/apt/sources.list 里,按镜像站的说明,填上内容,再执行 sudo apt update更新一下。

如果不行,再根据报错内容进一步调整。


某些情况下,清华源也非常慢,甚至会被拒绝访问,因为这个源的知名度过高,服务器压力特别大。


此外,要回复某个帖子,请点击 那个帖子右下角 的 “回复” 按钮,否则您的回帖不是回复给特定人的,对方无法受到通知。

那你使用vim或者nano粘贴

Types: deb
URIs: http://mirrors.ustc.edu.cn/debian
Suites: trixie trixie-updates
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
URIs: http://mirrors.ustc.edu.cn/debian-security
Suites: trixie-security
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

需要补充一下,您这个是 DEB822 格式,需要粘贴在 /etc/apt/sources.list.d/debian.sources 中。

多谢告知