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 foreveras you can see in this screenshot: https://i.stack.imgur.com/NXJNx.png
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屋!