The command ping is used to test whether your computer can communicate with another device (computer/server/printer) connected to your network or the internet.
To do a ping test on Mac, open Finder and go to Applications > Utilities. Then open the Terminal app and type ping followed by a space and then an IP address ...
Click Applications > Utilities > Terminal. · Type ping -c <number of times to ping> <IP address>. The IP address is xxx.xxx.xxx.xxx, where xxx is a number ...
Open Terminal using Spotlight, and then type the command ping [address]. Replace [address] with the address of the site you want to ping (ie facebook.com).