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.
01Command
$ ping -c 5 example.com02What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ping - Send ICMP ECHO_REQUEST to network hostsEvidence: Documents the -c option as 'count', i.e. stop after sending (and receiving) that many ECHO_RESPONSE packets.
- PING(8) - macOS manual pageEvidence: 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
Erase the broken Spotlight database so macOS re-indexes your drive from scratch.
Read the serial number, model identifier and chip without opening About This Mac.
See how many charge cycles the battery has used and its health condition.