我运行Ubuntu焦点作为WSL2安装在Windows 10上。
看来我的Ubuntu安装无法下载任何文件。我用一个简单的wget命令演示了它,但是情况是阻止了sudo apt update和其他任何系统更新。
ping正在返回预期的结果。
主机Windows系统正在按预期工作,并且能够显示wget无法获取的文件。这可以在下面的图片中看到

下面是一个示例会话:
$ lsb_release -d
Description: Ubuntu 20.04.3 LTS
$ uname -r
5.4.72-microsoft-standard-WSL2
$ wget https://raw.githubusercontent.com/WesPeacock/SampleSFM/master/README.md
--2021-10-02 20:30:05-- https://raw.githubusercontent.com/WesPeacock/SampleSFM/master/README.md
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... failed: Connection timed out.
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... ^C
$ ping raw.githubusercontent.com
PING raw.githubusercontent.com (185.199.111.133) 56(84) bytes of data.
64 bytes from cdn-185-199-111-133.github.com (185.199.111.133): icmp_seq=1 ttl=59 time=21.0 ms
64 bytes from cdn-185-199-111-133.github.com (185.199.111.133): icmp_seq=2 ttl=59 time=22.8 ms
64 bytes from cdn-185-199-111-133.github.com (185.199.111.133): icmp_seq=3 ttl=59 time=22.2 ms
64 bytes from cdn-185-199-111-133.github.com (185.199.111.133): icmp_seq=4 ttl=59 time=22.1 ms
^C
--- raw.githubusercontent.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 21.047/22.023/22.798/0.627 ms发布于 2021-10-04 14:20:03
问题是Windows反病毒软件防火墙已经将本地网络设置为不可信的。
https://askubuntu.com/questions/1367093
复制相似问题