Pinging an IP address or website helps you determine if your computer can communicate over a network with another computer. Below are the steps on how to ping an IP address and website based on your computer operating system.
Windows command line and MS-DOS users
- Open the Windows command line.
- At the prompt, type the following command and replace “computerhope.com” with the domain name or IP address of the computer you want to ping.
ping google.com
If you get a response from the computer or another network device, it should look similar to the following example.
- Windows command line and MS-DOS users.
- Apple computer users.
- Linux users.
Pinging computerhope.com [216.58.216.164] with 32 bytes of data: Reply from 216.58.216.164: bytes=32 time=64ms TTL=53 Reply from 216.58.216.164: bytes=32 time=64ms TTL=53 Reply from 216.58.216.164: bytes=32 time=65ms TTL=53 Reply from 216.58.216.164: bytes=32 time=65ms TTL=53 Ping statistics for 216.58.216.164: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 64ms, Maximum = 65ms, Average = 64ms
As seen in the statistics above, four packets were sent and four were received with a 0% loss. This result indicates the computer has no issues communicating across the network. If you had errors during the ping, it would look similar to one of the following examples.
Ping request could not find host fakeasdf.com. Please check the name and try again.
or
Pinging fakeaddress.com [199.59.243.120] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for 199.59.243.120: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
With the first example of a bad response, the “fakeasdf.com” is an unknown address (does not exist) and, therefore, could not start the ping. In the second example, ping was able to find an address of “199.59.243.120” for “fakeaddress.com” but received no response from the server.
Apple computer users
- Open the Terminal.
- At the prompt type the following command and replace “computerhope.com” with the domain name or IP address of the computer you want to ping.
PING computerhope.com (216.58.216.164): 56 data bytes 64 bytes from 216.58.216.164: icmp_seq=0 ttl=53 time=65.929 ms 64 bytes from 216.58.216.164: icmp_seq=1 ttl=53 time=66.486 ms 64 bytes from 216.58.216.164: icmp_seq=2 ttl=53 time=67.112 ms ^C — computerhope.com ping statistics — 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 65.929/66.509/67.112/0.483 ms
As seen in the above statistics, three packets were sent, and three were received, which indicates the computer has no network communication problem. If you had errors during the ping, it would look similar to one of the following examples.
The computer continues to ping the IP address until you press Ctrl+C to cancel. Once you cancel, the statistics are shown.
ping: cannot resolve fakeasdf.com: Unknown host
PING fakeaddress.com (199.59.243.120): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 ^C — fakeaddress.com ping statistics — 5 packets transmitted, 0 packets received, 100.0% packet loss
Linux users
- Open the Terminal or Shell to get to a command line.
- At the prompt type the following command and replace “computerhope.com” with the domain name or IP address of the computer you want to ping.
PING computerhope.com (216.58.216.164) 56(84) bytes of data. 64 bytes from computerhope.com (216.58.216.164): icmp_seq=1 ttl=64 time=0.018 ms 64 bytes from computerhope.com (216.58.216.164): icmp_seq=2 ttl=64 time=0.032 ms 64 bytes from computerhope.com (216.58.216.164): icmp_seq=3 ttl=64 time=0.031 ms ^C — computerhope.com ping statistics — 3 packets transmitted, 3 received, 0% packet loss, time 2692ms rtt min/avg/max/mdev = 0.018/0.027/0.032/0.006 ms
ping: unknown host fakeasdf.com
PING fakeaddress.com (199.59.243.120) 56(84) bytes of data. ^C — fakeaddress.com ping statistics — 9 packets transmitted, 0 received, 100% packet loss, time 8039ms
When doing a ping, if the address gives no response, press Ctrl+C to cancel the ping to display the statistics. Linux may not display timeout requests.
Related information
- How to use ping, winipcfg, and other network commands.
- How to determine the IP address of a computer or website.
- How to find the physical location of an IP address.
- Why can I not ping microsoft.com, amazon.com, or another site?
- See our ping command page for further information on the ping command for Windows command line and MS-DOS users.
- See the Linux and Unix ping command page for further information about this ping command.
- See our ICMP and ping terms for further information and related links.
- Network and network card help and support.