为什么在 Win 10 上的 Bash 上 ping 失败并显示“icmp open socket: Permission denied”?

Nei*_*ilh 6 networking windows-subsystem-for-linux

在我的 cmd 提示符下的 win10 机器上,我已经激活了 bash

lxrun /install /y  
Run Code Online (Sandbox Code Playgroud)

然后

lxrun /install /y  
Run Code Online (Sandbox Code Playgroud)

它也失败为sudo, 和su。这是许多其他行动的综合。我最初使用用户名安装并尝试执行sudo apt-get update但失败了。所以我lxrun /uninstall /full,然后重新安装了最简单的设置,以找出网络似乎无法正常工作的原因。

我的机器是“测试模式”Windows 10 Home,Build 14393.187(版本1607)

小智 4

这是一个已知的问题:

https://github.com/Microsoft/BashOnWindows/issues/18

ping 目前不适用于 WSL。

sudo 和 su 不工作可能是由于主机文件配置不正确造成的。看到这个问题:https://superuser.com/questions/1108197/sudo-on-windows-10-linux-subsystem-cannot-resolve-local-machine-name


小智 3

我以管理权限打开它,然后它就可以工作了