
The ping command is a fundamental tool used across devices of various operating systems. In this article we are going to deep dive into the ping command and discuss how it can be used and what options exists when executing the command from Windows, MacOS, and Linux operating systems.
The ping command is used by IT professionals and everyday home users to test the connectivity between two points in a network. Understanding how the ping command works and how to execute it will give you another tool towards troubleshoot network issues or testing responsiveness to a device or website.
Ping stands from "Packet Internet Grouper" and it sends ICMP (Internet Control Message Protocol) echo request packets to a host and waits for a response. The RTT (Round Trip Time) is outputted along size the host IP, time to live (ttl), and packet size.
You can use more than one option per command as well. For example, you would enter
If you have any questions or commands about this article then please leave a comment or post in our forums.
The ping command is used by IT professionals and everyday home users to test the connectivity between two points in a network. Understanding how the ping command works and how to execute it will give you another tool towards troubleshoot network issues or testing responsiveness to a device or website.
Ping stands from "Packet Internet Grouper" and it sends ICMP (Internet Control Message Protocol) echo request packets to a host and waits for a response. The RTT (Round Trip Time) is outputted along size the host IP, time to live (ttl), and packet size.
Ping Syntax
The command is funtamentally the same across all operating systems. You start with the ping command, followed by the options, and finish with the destination.
Bash:
ping [options] destination
Ping Options:
The ping command has different options that can be applied across Windows, MacOS, and Linux systems. To add an option you simple enter the option before the destination. For example, you would enter the commandping -n 100 ipsearch.io
if you wanted to send exactly 100 echo requests to IPSearch.io from a Windows operating system.You can use more than one option per command as well. For example, you would enter
ping -c 5 -i 10 ipsearch.io
if you wanted to send 5 echo request to ipsearch.io and wait 10 seconds before each request from a MacOS or Linux computer.Windows Ping Options:
To access the ping help on Windows you use theping /?
command.Options | Option Description |
---|---|
-t | Ping the specified host until stopped. To stop, use Ctrl+C. |
-a | Resolve addresses to hostnames. |
-n count | Send a specified number of echo requests. |
-l size | Send buffer size. |
-f | Set Don't Fragment flag in packet (IPv4-only). |
-i | Set Time To Live. |
-w | Set timeout in milliseconds to wait for each reply. |
Linux/macOS Ping Options:
To access the ping help on MacOS you use theman ping
command.Options | Option Description |
---|---|
-c count | Stop after sending (and receiving) count ECHO_RESPONSE packets. |
-i interval | Wait interval seconds between sending each packet. |
-s packet size | Specifies the number of data bytes to be sent. |
-t ttl | Set Time to Live. |
-W timeout | Time to wait for a response, in seconds. |
-A | Adaptive ping. Interpacket interval adapts to round-trip time. |
-q | Quiet output. Only summary lines at startup time and completion. |
-L | Suppress loopback of multicast packetson multicast address. |
If you have any questions or commands about this article then please leave a comment or post in our forums.