当我使用适用于 Windows 10 的 WSL 时,我无法 ping 通任何网站。我在 WSL 中运行 Ubuntu 18.04。
--- google.com ping statistics ---
14 packets transmitted, 0 received, 100% packet loss, time 38567ms
Run Code Online (Sandbox Code Playgroud)
这是当我尝试 ping google.com 时的结果,我使用的是带 IPv4 的 Windows 10,禁用了 IPv6。我可以在常规命令提示符下正常 ping google.com,无需使用 wsl
我正在运行 Avast internet security,当我从 ubuntu/WSL 实例内部 ping google 时,这就是我所看到的。
1:
我需要做什么才能在 WSL 中启用 ping