Test Internet Connection Using Ping
The ping
command is a useful tool for testing your internet connection and diagnosing network issues. It allows you to check whether your Mac can reach a specific server or website, and how long it takes for data to travel between your device and the destination.
In this guide, we will walk you through how to use the ping
command in Mac Terminal to test your internet connection.
What Is the Ping Command?
The ping
command sends a small packet of data to a specified server or device and measures how long it takes for that packet to travel to the destination and back. It reports on the round-trip time (also called latency) and lets you know if any packets were lost, which could indicate network problems.
Basic Usage of the Ping Command
To use the ping
command, open your Mac Terminal and enter the following command:
ping google.com
This will send continuous ping requests to Google’s servers (you can replace google.com
with any other domain or IP address). After you run the command, the Terminal will display information about the time it takes for each ping to reach the server and return. For example:

Here’s what the output means:
- icmp_seq: The sequence number of each ping request.
- ttl: Time-to-live value, indicating the number of hops the packet can make before being discarded.
- time: The round-trip time (in milliseconds) that it took for the packet to travel from your Mac to the server and back.
Stopping the Ping Command
By default, the ping
command will keep running continuously. To stop it, press Ctrl + C
in the Terminal. When you stop the command, it will display a summary of the ping statistics, showing the number of packets sent, received, and lost:

Here’s what the summary means:
- packets transmitted: The total number of ping requests sent.
- packets received: The total number of responses received.
- packet loss: The percentage of packets that were lost (ideally, this should be 0%).
- round-trip min/avg/max: The minimum, average, and maximum time (in milliseconds) it took for the packets to make a round trip to the server and back.
Ping with a Specified Number of Requests
By default, the ping
command will keep running until you stop it manually. However, you can limit the number of ping requests sent by using the -c
option. For example, to send exactly 5 ping requests, use the following command:
ping -c 5 google.com
After sending 5 requests, the command will automatically stop and display a summary of the ping statistics.

Ping an IP Address
In addition to pinging a domain name (like google.com
), you can also ping a specific IP address. This can be useful for troubleshooting connectivity to a specific device or server. To ping an IP address, use the following command:
ping 8.8.8.8
This command will ping Google’s public DNS server at 8.8.8.8
, which is commonly used for testing internet connectivity.

Interpreting Ping Results
The ping
command can help you identify several common network issues based on its results:
- High latency (long round-trip times): If the ping times are consistently high (e.g., greater than 100 ms), it may indicate a slow or congested connection.
- Packet loss: If any ping packets are lost, it can indicate a problem with the network connection, such as interference, congestion, or an issue with the server.
- No response: If you don’t receive any responses (100% packet loss), the server or device you’re pinging may be down, unreachable, or blocking ping requests.