Windows Ping Command

The ping command is used to test the availability of a remote or destination machine on a network. In this tutorial, I'll show you it's various uses on Windows operating systems.

All the commands can be run on command prompt or PowerShell. I have tested the tutorial on Windows 10, however, it should run on Windows 8, 7 and XP too.

How to Ping a Machine

To ping any machine, execute the following command

ping <IP address of machine suppose 127.0.0.1>

How to Constantly Ping/Send Requests to a Destination Machine

By default, ping sends 4 packets to the destination machine. If you want ping to constantly send a packet to your machine, use the -t switch. When you want to stop the ping command from sending packets, press CTLR and C simultaneously from your keyboard. The ping command should look like the following:

ping <IP address of machine suppose 127.0.0.1> -t

How to Ping/Send Requests to Destination Machine for the Desired Number of Times

By default, ping sends 4 requests or a destination machine is pinged 4 times. But, if you want to send your desired number of requests, you will have to use -n switch. The complete command should look like the following,

ping <IP address of machine suppose 127.0.0.1> -n count

Example:

ping 127.0.0.1 -n 10

How to Send a Specific Packet Size in Ping Request

By Default, ping request sends a 32-byte packet to the destination machine. If you want to change, you will have to use -l switch. The complete command should look like the following,

ping <IP address of machine suppose 127.0.0.1> -l size

The packet size can be any value from 32 to 65,527.

Example:

ping 127.0.0.1 -l 64

How to Make a Ping Request to resolve an IP address to Host Name

If you want a ping request to resolve an IP address to a hostname, you will have to use the -a switch. The complete command should look like the following,

ping <IP address of machine suppose 127.0.0.1> -a

Conclusion

There are many switches available you can use with the ping command. However, I have explored the commonly used in this tutorial.

How to Use Ping Command in Windows 10
Tagged on:         
Avatar

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn

One thought on “How to Use Ping Command in Windows 10

  • Avatar
    October 3, 2019 at 6:36 pm
    Permalink

    Spelling mistake

    press CTLR

    press CTRL

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*