The ping command helps determine the TCP/IP network’s IP address and issues with the network and assists in resolving them. See the ping definition for a full description.
Availability
Ping is an external command available for the following Microsoft operating systems as ping.exe.
Availability
Ping syntax
Ping examples
Related questions
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Windows 8
Windows 10
Windows 11
Ping syntax
Windows 10 and Windows 11 syntax
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p] [-4] [-6] target_name
Options:
- Windows 10 and Windows 11 syntax.
- Windows Vista, 7, and 8 syntax.
- Windows XP and lower syntax.
Windows Vista, 7, and 8 syntax
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] [-R] [-S srcaddr] [-4] [-6] target_name
Windows XP and lower syntax
ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] destination-list
Ping examples
ping localhost
Pings the localhost, which helps determine if the computer can send information out and receive the information back from itself.
ping computerhope.com
The command above does not send information over the network but can indicate if the card can respond.
Ping supports the ability to ping an Internet address. In the example above, we pinged “computerhope.com” and, as seen, received four responses. If we couldn’t reach the server or the server was blocking our request, we would have lost all four packets.
ping 216.58.216.164
Allows you to ping another computer where <216.58.216.164> can be the IP address of the computer you want to ping. If you do not get a reply or get lost packets, you have a problem with your network: cable issues, network card issues, drivers, router, switch, or other network problems.
Related questions
Is there a continuous ping option?
ping
-tUse the -t option to ping any address until you cancel it by pressing Ctrl+C.
When I ping the IP address doesn’t look right
With newer versions of the ping command and computers running on IPv6, you may get an IP address that looks something like [fe80::51c1:5214:a18e:8dec%12] instead of [192.168.1.7]. To get the IPv4 IP address, use the following command.
ping
The hostname can be any computer, and the -4 forces the address to be shown as an IPv4 address.
Related information
- Why can I not ping microsoft.com, amazon.com, or another site?
- How to determine the IP address of a website.
- How to test if a website or web page is down.
- See our ping definition for further information and related links on this term.