The ping command is commonly used to troubleshoot network problems and assess the health of a network connection. Learn how the ping command works, how to use it on Windows, and examples of a few scenarios you can use it for.

What Does the Ping Command Do?

The ping command is a network utility tool used to test the availability of a host, usually a server or computer, locally or over the internet.

When you use the ping command, your device periodically sends packets of data (also known as echo request messages) to the specified IP address (or domain name) and waits for a response from the server each time. If your device receives a response back, the server is considered online. If the server fails to respond, the signal is considered lost, indicating a server problem.

Opening the Windows PowerShell utility from the Run dialogue box in Windows.

Besides checking if a host is reachable, the command keeps track of the round-trip time. This is the time a message takes to go from a source computer to a destination server and then return to the source, along with a response from the destination server. This data can help you analyze how stable your connection to a server is.

Syntax of the Ping Command

The basic syntax of the ping command looks like this:

The parameter specifies the hostname or IP address of the destination server. It can be entered as either “domain.com” or “8.8.8.8”. Running the Ping command with this syntax only pings the specified server four times. Then, the test stops and compiles the results for further analysis.

Besides this basic parameter required for the Ping test to execute correctly, you’re able to also use other parameters listed on theMicrosoft websiteto customize the test further.

Running the ping command in Windows PowerShell.

How to Use the Ping Command on Windows

To run the ping command on Windows, follow the steps below:

Alternatively, you may perform the test in Command Prompt. Simply pressWin + R,type“cmd,”and clickOK. Then, type the command and press Enter.

Running the Command Prompt app from the Run dialog box in Windows.

If you are an administrator of a locked corporate-owned PC, you might need to run PowerShell or Command Prompt with administrative privileges to run the ping test. To do so, type"Command Prompt"or"PowerShell"in Windows Search, right-click on the utility, and select"Run as administrator."

Then, click"Yes"in theUAC (User Account Control)window.

Analyzing the Results of the Ping Test

TheSentpackets (with a default size of 32 bytes each) indicate how many messages were sent from the host device to the remote server.Receivedpackets show the number of responses received from the server to the host device.Lostpackets represent the number of signals sent from the host device that the destination server didn’t respond to.Timerefers to the round-trip time of each ping.

TheTTL(Time to Live) value is the lifespan of the packet in the network, after which it’s discarded after a certain number of hops through routers. The common benchmark is 64, but TTL can be higher if the data packet is sent through a complex network. But a drastically longer one deserves a closer look to ensure your network is functioning smoothly.

Running the Windows PowerShell as an administrator on Windows.

If the ping doesn’t go through correctly in the test, and you see a “request timed out” error, it indicates an issue with your internet connection.

How Do You Stop the Ping Command?

The ping command supports a “/t” parameter that specifies that it should continue sending echo requests to the destination server until interrupted. If you use this parameter when running the ping test, your device keeps pinging the specified server until you manually stop the test. To stop an ongoing ping test, you can pressCtrl + Cor pressCtrl + Enterto stop and display the data.

What Can the Ping Command Do for You?

Here are some common uses for the ping command:

Besides the ping command, you can alsouse other CMD commands to manage your wireless networkseffectively.

Stopping the ping test to analyze results in Windows Command Prompt