ping - sends packets to a network host to check if it's online
Sat April 4, 2023

Use ping host.
For example, ping google.com will send packets to Google’s servers to see if they’re responding.
If you only want to try pinging the host a certain number of times, you can use
ping -c count host. For example,ping -c 3 google.comwill send 3 packets to Google’s servers and then stop.If you’re having trouble with your network and want to see if there’s a delay between packets, you can use
ping -i seconds host. For example,ping -i 2 google.comwill send packets to Google’s servers with a 2-second delay between them.If you don’t want to wait for your system to lookup a symbolic name for the address (like “google.com” to its IP address), you can use
ping -n host. For example,ping -n 8.8.8.8will send packets to Google’s public DNS server without performing a name lookup.Finally, if you want to see a message if no response is received, you can use
ping -O host. For example,ping -O yahoo.comwill send packets to Yahoo’s servers and will output a message if no response is received.