Frankfurt, DE (Auto)
← Back to Blog
Mac Expert5 min read

How to Use the Ping Command on Mac Terminal: Complete Tutorial

#mac#terminal#ping#macos

Opening Terminal on macOS

The ping command lives inside Terminal, the command-line app built into every Mac. The fastest way to open it is Spotlight: press Command + Space, type "Terminal", and press Enter. If you prefer clicking, open Launchpad, type "Terminal" into the search bar, and click the icon — it is usually filed under Other. Once the window opens with a blinking cursor, you are ready to run your first ping.

The Basic Ping Command

Type ping checkping.io and press Enter. Terminal starts sending small packets to that host and printing a line of output for every reply it gets back. There is one important difference from Windows here: macOS pings forever by default. It will not stop on its own after four attempts the way Command Prompt does — it keeps going until you tell it to stop by pressing Control + C.

Limiting the Count with -c

Letting ping run forever is fine for a quick eyeball check, but for anything you want to read as a finished report, add the -c flag followed by a number. Run ping -c 10 google.com and Terminal sends exactly 10 packets, then stops automatically and prints a summary. This is the version worth memorizing — it is the one you will use for almost every real diagnostic.

Reading the Ping Output Line by Line

A typical result from ping -c 3 google.com looks like this:

PING google.com (142.250.72.14): 56 data bytes

64 bytes from 142.250.72.14: icmp_seq=0 ttl=115 time=14.223 ms

64 bytes from 142.250.72.14: icmp_seq=1 ttl=115 time=13.958 ms

64 bytes from 142.250.72.14: icmp_seq=2 ttl=115 time=15.001 ms

--- google.com ping statistics ---

3 packets transmitted, 3 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 13.958/14.394/15.001/0.442 ms

Each part of that output tells you something different:

  • icmp_seq: the sequence number of the packet, starting at 0. If a number is missing from the list, that specific packet never came back — an early sign of packet loss.
  • ttl: Time To Live, the number of network hops the reply had left when it reached your Mac. A ttl around 115 or 116 for a reply from a Linux-based server usually means it started at 128 and lost a few hops along the route; a much lower ttl than expected can indicate an unusually long or unstable path.
  • time: the round-trip time in milliseconds — how long it took for the packet to reach the server and the reply to come back to you. This is your ping, measured per packet rather than as a single average.
  • round-trip min/avg/max/stddev: the summary line at the end. min is your fastest recorded reply, avg is the mean across all packets, max is your slowest reply, and stddev (standard deviation) measures how much the times varied from one packet to the next — in other words, your jitter. A stddev under a couple of milliseconds means a stable connection; anything climbing into double digits means your latency is bouncing around, which feels worse in a real-time game than a slightly higher but steady average.

Useful Ping Flags on macOS

macOS ping shares many flags with Linux, but a few behave differently — mixing them up is a common source of confusion when following guides written for another platform.

FlagExampleWhat it does on macOS
-cping -c 20 google.comSends exactly 20 packets, then stops and prints the summary. Without it, ping runs until you press Control + C.
-iping -i 2 google.comWaits 2 seconds between each packet instead of the default 1 second. Useful for spreading out a long-running test.
-sping -s 1200 google.comSets the packet payload size in bytes (default 56). Larger packets can reveal MTU or fragmentation issues that small packets never trigger.
-tping -t 5 google.comOn macOS, -t sets a total timeout in seconds for the entire command. This is different from Linux, where -t sets the outgoing packet's TTL value — do not assume guides written for Linux apply directly to your Mac.

Practical Recipes

Ping Your Router First

Before blaming your ISP or a game server, isolate whether the problem is inside your own home. Find your router's address (usually 192.168.1.1 or 192.168.0.1, visible in System Settings under Network) and run ping -c 20 192.168.1.1. Any loss or high latency here means the issue is your Wi-Fi, cabling, or the router itself — not anything further upstream.

1.1.1.1 vs a Domain: DNS or Connectivity?

If a site seems unreachable, run ping -c 5 1.1.1.1 alongside ping -c 5 google.com. Cloudflare's 1.1.1.1 is a raw IP address, so pinging it tests pure connectivity with no DNS lookup involved. If that works but pinging a domain name fails or hangs before the first reply, your DNS resolution is broken, not your internet connection — try switching DNS servers rather than restarting your router.

Detecting Packet Loss and Jitter

Run a longer sample with ping -c 50 google.com and check the final summary. Any percentage above 0% in "packet loss" means packets are being dropped somewhere on the route — worth investigating even at 1-2%. Then look at stddev in the min/avg/max/stddev line: a small stddev relative to the average means your connection is consistent, while a stddev that is a large fraction of the average means your latency is jittery, which shows up as stutter and rubber-banding in games even when the average ping looks fine.

When the Terminal Isn't Enough

Terminal ping is precise and free, but it has real limits for gamers: it only tests one destination at a time, it uses ICMP packets that some game servers and networks deprioritize differently from real game traffic, and it tells you nothing about which regional server will actually give you the best connection. For that, a browser-based online ping test that checks several regions at once — including the endpoints closest to actual game-server locations — gives you a faster, more practical picture without opening a terminal at all. If you split your time between a Mac and a Windows PC, our guide to checking ping on Windows with CMD covers the same fundamentals with the syntax differences that trip people up. And once you have a set of numbers in front of you, see how to read ping test results to understand what the min, max, average, and jitter are really telling you about your connection.