ping

Test network connectivity and measure round-trip latency.

low risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

ping sends ICMP echo requests to test if a host is reachable and measure round-trip time. On Linux, ping runs indefinitely by default (unlike macOS) — use -c to limit packets. The -i flag controls interval, -s sets packet size for bandwidth testing.

Common flags
FlagMeaning
-c --countNumber of packets to send
-i --intervalSeconds between packets
-t --ttlSet Time To Live
-s --sizePacket size in bytes
-W --timeoutSeconds to wait for reply
Examples
ping -c 4 8.8.8.8Send 4 packets to Google DNS · explain & risk-check →
ping -c 100 -i 0.2 10.0.0.1 | tail -2Fast flood test and show statistics only · explain & risk-check →
ping -c 1 -W 2 host && echo UP || echo DOWNBinary up/down check in scripts · explain & risk-check →
Pro tip

Use `ping -c 100 -q host` for a quick latency baseline — the -q flag shows only statistics. Compare min/avg/max/mdev to identify jitter vs consistent latency issues.

Related
traceroute dig nc
Open the full explainer →More in Networking

Reference text is hand-written and may be incomplete — check man ping for your version. Test destructive commands on a non-production system first.