Why does ping fail with "icmp open socket: Permission denied" on Bash on Win 10?

15,623

Solution 1

This is a known issue:

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

ping doesn't currently work on WSL.

sudo and su not working are probably a result of the host file not being configured correctly. see this question: https://superuser.com/questions/1108197/sudo-on-windows-10-linux-subsystem-cannot-resolve-local-machine-name

Solution 2

I open it with administration permission and then it works

Share:
15,623
Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    On my win10 machine in cmd prompt I've activated bash with

    lxrun /install /y  
    

    then

    neilh>bash  
    
    root@NHPINSP:/mnt/c/Users/neilh# ping google.com  
    $ su ping google.com  
    "ping: icmp open socket: Permission denied"  
    

    It also fails as sudo, and su. This is a synthesis of a number of other actions. I initially installed with a username and was trying to do a sudo apt-get update but it failed. So I lxrun /uninstall /full, and then reinstalled the simplest setup to find out why the networking doesn't seem to be working.

    My machine is "Test Mode" Windows 10 Home, Build 14393.187 (version 1607)