Today we will explore the Ping command. First, we will explain its definition and how you can use it. Finally, we will discover the five most popular Ping commands. Let’s start.
Definition of the Ping command
One of the built-in network diagnostic commands in your operating system is the Ping command (Windows, Linux, macOS, FreeBSD, etc.). Ping is used to test connectivity between your device and the target, which can be an IP address like 188.8.131.52 or a hostname like google.com.
By default, Ping uses the ICMP protocol to send the target four messages, each containing 32 bytes (Internet control message protocol).
How can you use it?
You can use the command on Windows devices in one of two ways: through the Command Prompt or using Windows PowerShell.
And if you are using Linux or macOS Operating systems, you may use it through the Terminal application.
5 examples of Ping command
- The basic Ping command allows you to check your connectivity and the capability of the computer you are testing. As a result, on Linux or macOS, you will constantly hear a ping. Use the Ctrl-C combo to stop it. If there are no problems, you will get four replies and statistics for Windows.
- On Windows, you should add the extra option “-t” for continuous ping. Fill in the following:
ping -t example.com
- For a specific quantity of inquiries. You are allowed to make a custom number of queries on macOS and Linux and more than four requests on Windows.
For Linux and Mac
ping –c 8 example.com
ping –n 8 example.com
- The space in between pings. You can calculate the time in seconds between requests.
ping -i 20 184.108.40.206
- Waiting period. It can be set to stop the ping command on macOS/Linux in seconds.
ping –w 50 example.com
So, the Ping command is a fundamental tool for network device testing. It is available on almost every OS and functions nearly identically on each one. ICMP packets should be sent, and the duration of the echo-response should be timed. Simple and ideal.