Enable Ping in WSL for standard user
When using Windows Subsystem for Linux the ping
command can be a essential tool to use. Unfortunately the default implementation will prevent a normal user to use the command.
When running the command as normal you will get the following message:
ping: socktype: SOCK_RAW
ping: socket: Operation not permitted
ping: => missing cap_net_raw+p capability or setuid?
To enable it for normal users you can run the following command to set the setuid
bit on the ping commmand:
sudo chmod u+s /bin/ping
Now the ping command will work for normal users also.