How to use ping on a Mac: pinging websites, domains, or IP addresses
Ping is an essential utility for network administrators, but it’s also pretty handy to check if websites are online, your internet connection is working, or if a network resource is available. Here’s how to use it the ping utility in Mac OS X:
* Launch the Terminal
* Type the following command:
* This will ping to google.com repeatedly until you stop the ping command from running with Control+C
* You can send a specific number of packets to an address by using the -c flag:
ping -c 5 192.168.0.1
The ping command only works if the server you are pinging responds to ping requests (most do if they’re online, except perhaps the most hardened networks).
I use ping constantly to make sure network servers are available, it’s a lot faster to ping an IP than to try and connect to it through any number of protocols.