ping is the simplest and most widely used network diagnostic tool. It sends ICMP Echo Request packets to a target and listens for Echo Replies — telling you whether the host is reachable and how long the round trip takes.

ICMP · RTT · Packet Loss · Linux · macOS · Windows
01 — How It Works

ping sends an ICMP Echo Request to the target host. If reachable, the host returns an ICMP Echo Reply. The time between sending and receiving is the round-trip time (RTT), measured in milliseconds.

ping is your first line of diagnosis — if you can't ping it, you can't reach it. If you can ping it but the service is down, the problem is above the network layer.

By default, ping runs continuously on Linux/macOS (stop with Ctrl+C) and sends 4 packets on Windows.

02 — Basic Usage
Linux / macOS
ping google.com
Windows
ping google.com
Typical output
PING google.com (142.250.185.46): 56 data bytes 64 bytes from 142.250.185.46: icmp_seq=0 ttl=117 time=12.4 ms 64 bytes from 142.250.185.46: icmp_seq=1 ttl=117 time=11.9 ms 64 bytes from 142.250.185.46: icmp_seq=2 ttl=117 time=12.1 ms --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss round-trip min/avg/max/stddev = 11.9/12.1/12.4/0.2 ms
FieldMeaning
icmp_seqSequence number — gaps indicate dropped packets
ttlTime To Live remaining when packet arrived — lower = more hops
timeRound-trip time in milliseconds
packet lossPercentage of sent packets that got no reply
min/avg/max/stddevRTT statistics across all probes
03 — Common Flags
FlagLinux / macOSWindows
Count-c <n>-n <n>
Interval (sec)-i <sec>
Packet size (bytes)-s <bytes>-l <bytes>
Timeout (sec)-W <sec>-w <ms>
TTL value-t <ttl>-i <ttl>
Force IPv4-4-4
Force IPv6-6-6
Flood ping-f (root only)
04 — Practical Examples
Send exactly 5 packets
ping -c 5 google.com # Linux / macOS ping -n 5 google.com # Windows
Larger packet size — test MTU / fragmentation
ping -s 1400 google.com # Linux / macOS ping -l 1400 google.com # Windows
Ping with 1-second interval continuously
ping -i 1 google.com
Fast flood ping (root required)
sudo ping -f -c 1000 192.168.1.1
Force IPv6
ping6 ipv6.google.com # Linux / macOS ping -6 ipv6.google.com # Windows
05 — Interpreting Results
What you seeWhat it means
0% packet loss, low RTTHost is reachable and the path is healthy
0% loss, high RTT (>100 ms)Host is reachable but the link is slow or congested
Intermittent loss (<10%)Unstable link — check cables, Wi-Fi signal, or ISP
High loss (>10%)Serious link problem — congestion, failing hardware, or QoS dropping ICMP
100% loss, no replyHost is down, ICMP is blocked by a firewall, or routing is broken
High stddev in RTTJitter — problematic for VoIP and real-time applications
TTL expired in transitRouting loop or max hops exceeded
⚠  A host that doesn't reply to ping is not necessarily down — many servers and firewalls block ICMP Echo Requests. Use traceroute or a port check to confirm.
ℹ  For continuous monitoring with statistics, consider mtr — it combines ping and traceroute into a live view per hop.