Ping command, what is it?
The Ping command is a great little utility tool with a simple command-line interface that serves for network diagnosing or, more precisely said – to probe a particular host or IP address (IPv4 address or IPv6 address) and see if there is a connection to it.
With the Ping command, you are sending packets of data using the ICMP (internet control message protocol) from your device to a target. The packets will be 4 by default, each with a 32-byte size, and you will get the time it took each of them to reach the target. Another useful part of the statistics is that you will get minimum, maximum, and average time (in milliseconds) for the road. An interesting detail is that you will see a percentage of lost packets. You will also get the IP address of the target.
In short, the ping command sends packets of data from your device to a target, waits for the packets to bounce, and see the statistics when they come back.
You can use it, no matter what system you are using. It is built-in in Windows, Linux, macOS, BSD, ChromeOS, or another. You can even use it with a Terminal emulation application on Android or iOS.
For what can you use the Ping command?
Use it to see the connectivity between you and another point on the network – IP address or hostname. That way, you see if the target is reachable, if it is experiencing downtime or if the connectivity with that target is really struggling.
A common use of the ping command is to see if a website is up and running and how long does it take for the pings to arrive. If the value is too high, that means bad connectivity, and you should see if there is a way to fix it.
How to use the Ping command like a pro?
It is easy to use. Open the Terminal or the Command Prompt on your computer, write “ping hostname / IP address”, and press enter. That’s it.
It is not hard to master the Ping command. You can learn to use the additional options and create more specific probes. You can edit the number of pings, trace the route, wait longer or shorter for the responses, use IPv6 or IPv4, and more.
To see the full list of options for your Linux or macOS computer, write the following in the Terminal application:
The options that you will see for Linux and macOS are:
|-a||The “a” is for audio. You will hear a sound when it arrives.|
|-b||The “b” is for broadcast IP address.|
|-B||The “B” blocks the changing of the source IP address.|
|-c (count)||The “c” is for the count of pings to send.|
|-f||The “f” is for flood with pings.|
|-i (interval)||The “i” is for an interval between pings.|
|-I (interface address)||Source IP address to interface IP address.|
|-1 (reload)||Number of pings without waiting for replies.|
|-n||The “n” is for hostname in the result.|
|-q||For a short answer.|
|-V||Shows the version of ping.|
|-w (deadline)||After how many seconds to stop the ping command.|
|-W (timeout)||Waiting period (in seconds) for a response.|
To see the full list of options for your Windows computer, write the following in the Command Prompt application:
The options that you will see for Windows are:
|-a||IP address to hostname resolving.|
|-n||The “n” is for the number of pings to send.|
|-l||Send the size of the buffer.|
|-v||Not working anymore.|
|-r||Trace the route (IPv4).|
|-s||Stamp each hop with time (IPv4)|
|-j||Loose source route along host-list (IPv4).|
|-k||Strict source route along host-list (IPv4).|
|-w||Waiting period (in seconds) for a response.|
|-R||Trace the route (IPv6).|
|-c||Router compartment identifier.|
|-p||Ping Hyper-V network.|