Commands · Command
ping
ping [options] hostSends ICMP echo request packets to a host and reports whether — and how quickly — it responds, the most basic test of network reachability.
// PLATFORM NOTES
Windows
stops after 4 pings by default; use `-t` to ping continuously, `-n` to set a specific count.
Linux
pings continuously by default; use `-c` to set a specific count.
macOS
same continuous-by-default behavior as Linux; use `-c` to limit.
// FLAGS
-tWindows only: ping continuously until stopped with Ctrl+C-nWindows: number of pings to send-cLinux/macOS: number of pings to send// EXAMPLE
ping 8.8.8.8 — sends echo requests to Google's public DNS server and reports round-trip time for each reply.
// GOTCHA
The default behavior is opposite across platforms — Windows stops after 4 pings unless you add -t, while Linux/macOS ping forever unless you add -c N. Assuming the other platform's default is a constant source of confusion in mixed environments.
// RELATED COMMANDS