What Does the ping Command Do?
ping sends small packets (ICMP echo requests) to a target host and measures how long it takes to receive a response, providing a basic check of connectivity...
Published November 18, 2026
ping sends small ICMP echo requests to a host and reports whether it replies and how long the round trip takes. It is the quickest way to test reachability and latency.
The concept
Each line shows the round-trip time (ms) and TTL. Packet loss and high or jittery times point to network problems.
A failed ping does not always mean a host is down; many servers and firewalls block ICMP.
Sample output
ping -c 3 example.com
64 bytes from 93.184.216.34: icmp_seq=1 ttl=56 time=18.2 ms
64 bytes from 93.184.216.34: icmp_seq=2 ttl=56 time=17.9 ms
3 packets transmitted, 3 received, 0% packet loss
Practical examples
Limit the count
ping -c 4 8.8.8.8Windows
ping -n 4 example.comDiagnose step by step
ping 127.0.0.1 (stack) → ping router → ping 8.8.8.8 (internet) → ping example.com (DNS)IPv6
ping -6 example.comCommon mistakes
- Concluding a site is down because ping fails (ICMP may be blocked).
- Not stopping an endless ping (Ctrl+C).
- Ignoring packet loss figures.
Key takeaways
- Tests reachability and latency.
- Watch loss and jitter.
- Blocked ICMP is common.
FAQ
What does TTL mean?
Hops remaining before the packet is dropped; it hints at distance.
Ping vs traceroute?
Ping tests the destination; traceroute shows each hop on the path.