Options available with ping
I have provided the frequently used options of the ping command in the table below:-
Option |
Description |
---|---|
-v (only in Linux or MacOS) |
Provides verbal support to the user while executing the command. |
-t (only in Windows) |
Continuously send packets till a kill signal is received through keyboard interrupt. |
-c (in Linux or MacOS) -n (in Windows) |
To specify the number of packets to be sent. |
-W (in Linux or MacOS) -w (in Windows) |
Sets waiting time while receiving packets (in seconds). |
-4 |
Forces ping to use IPv4 addresses only. |
-6 |
Forces ping to use IPv6 only. |
-t (in Linux or MacOS) -i (in Windows) |
To specify TTL(Time To Live) for the IP packets. |
-h (only in Linux or MacOS) |
To get help regarding the usage of the command. |
-s (in Linux or MacOS) -l (in Windows) |
To specify the size of ping packet to be sent. |
Note: For the options that work only in a specific OS, the details are provided within curved brackets. If no specification is provided, then the option remains the same in all three operating systems.
How to ping an Ip on windows macos and Linux
Ping is a command line networking utility that uses ICMP packets to check if a logical route is available to communicate with a specific host. A failure of the ping command doesn’t necessarily mean that the host is down. There are many other possible reasons for the failure. Along with the primary purpose of ping, this command can also provide insights about some of the useful networking parameters, such as Round Trip Time (RTT). Ping is available by default in all three operating systems. So, usually, you don’t need any prerequisites for executing this command.
The term ‘ping‘, in computer terms, refers to sending a message to a host to check if the host is up (alive and running) or down (dead). For simplification, think of ping as a message that contains the question ‘Hey, are you there?’. This might sound simple, but it is one of the handy commands still used by network engineers to troubleshoot various network issues. In this article, we will learn how to ping a host using its IP address, from the top 3 operating systems – Windows, Mac OS, and Linux.