WSL Ubuntu(适用于 Linux 的 Windows 子系统)上没有互联网连接 [英] No internet connection on WSL Ubuntu (Windows Subsystem for Linux)
问题描述
最近我在我的 Windows 机器上安装了 WSL Ubuntu 18.04,但似乎没有任何工作正常,因为我无法访问互联网.
我尝试了一些命令,sudo apt update
说连接失败",并且 ping google.com
从字面上看需要永远,正如您在此屏幕截图中看到的:
Recently I installed WSL Ubuntu 18.04 on my Windows machine, but nothing seems to work properly, because I have no internet access.
I tried a few commands and sudo apt update
says 'Connection failed' and ping google.com
literally takes forever as you can see in this screenshot:
我还检查了 nano/etc/resolv.conf
并确保名称服务器是正确的,完全禁用了卡巴斯基及其防火墙,禁用了 Hyper-V,重新安装了几次 WSL,甚至禁用了 Windows Defender.没有任何帮助.
那么您有什么想法可能是这里的问题吗?
I also checked nano /etc/resolv.conf
and made sure that the nameservers are right, completely disabled Kaspersky and its firewall, disabled Hyper-V, reinstalled WSL a few times and even disabled Windows Defender. Nothing helped.
So do you have any ideas what the issue could be here?
推荐答案
以管理员身份打开命令提示符并键入以下命令:
Open Command Prompt as an Administrator and type these commands:
netsh winsock reset
netsh int ip reset all
netsh winhttp reset proxy
ipconfig /flushdns
重启你的机器.
https://github.com/microsoft/WSL/issues/3438#issuecomment-410518578
这篇关于WSL Ubuntu(适用于 Linux 的 Windows 子系统)上没有互联网连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!