Every networker knows ping, for many of us it's a daily (hourly!) used tool. One of the things I do is host an SSH server on my home computer for a variety of purposes, one of which is to have a third-party testing platform so that I can verify connectivity from multiple paths. Unfortunately I goofed up somewhere in the installation process and whenever I tried to run ping from within cygwin, I was faced with a string of ping: recvfrom: Invalid argument scrolling up my screen at break-neck speed.
After a bit of digging around, I found that this was because the permissions of my user account (I don't surf with my admin account) prevented me from accessing the resources needed to send ping packets.
Luckily, there's a quick work-around. Cygwin is able to access and execute all the same commands that are normally available through the Windows command prompt to include ping. Here's how you can solve this problem:
at the $ prompt type $SYSTEMROOT/system32/ping google.com and you will see pings sent out.A cooler way to achieve this is to use an alias in your .bashrc file. To do this you need to
- Open Windows Explorer and navigate your way to your cygwin\home directory (usually C:\cygwin\home\).
- Open the folder for the user account you log in with.
- Open the file named .bashrc in your favorite text editor (mine is Notepad++).
- Add the following line to the end of the file:
- Then restart your cygwin window and instead of typing out the whole $SYSTEMROOT/blah/blah, just type p google.com!