Test Network Connectivity with ping -c

Check whether your Mac can reach a website and how fast, with a five-packet ping instead of an endless stream.

macOSpingnetworkDiagnosticsLow risk
Run ping -c 5 example.com to send exactly 5 test packets and see the response times and packet loss in a summary line.

01Command

Command
$ ping -c 5 example.com

02What it does

ping sends small ICMP echo packets to a host and measures how long replies take; -c 5 stops after five rounds and prints a loss/time summary, unlike the macOS default which runs forever. Use it in stages: ping your router's IP (often 192.168.1.1) to test local Wi-Fi, then ping 8.8.8.8 to test the internet connection itself, then ping a domain name — if the IP works but the name fails, your DNS is the culprit.

03Risk

RiskLow risk
!Warning: Many servers block or rate-limit ping, so a failed reply doesn't always mean the site is down — try a second target before blaming your network.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ping - Send ICMP ECHO_REQUEST to network hosts
    SS64 · technical · 2026-09-17
    Evidence: Documents the -c option as 'count', i.e. stop after sending (and receiving) that many ECHO_RESPONSE packets.
  • PING(8) - macOS manual page
    Apple (Xcode man pages mirror) · vendor-doc · 2026-09-17
    Evidence: The manual page describes ping as sending ICMP ECHO_REQUEST packets and documents -c count to stop after that many replies.

Last verified: 2026-09-19 · Category: Network

06Related solutions