How can I use the the ping command?

FibreStream Updated by FibreStream

Ping is a function used by network devices to both calculate the time it takes to reach another network device and confirm its reachability. Ping sends a signal (or packet) to a device, and the receiving network device is expected to respond with its own ping. Ping is calculated in milliseconds.

You can run a ping test on your device easily. Here’s how to run the ping command with a Windows, Mac or Linux operating system:

Windows

The ping command in Windows is used by typing just that, ping, in a command prompt window. Command prompt in Windows allows you to type commands executed by the operating system. To open a command prompt window, simply search “cmd” or “command prompt” in your Windows search bar.

Select the command prompt to open a DOS or command prompt window.

Type in the ping command followed by the host name or address.

Once done, press Enter. 

You must enter an address to ping. Ping commands test the connectivity to another network device, so after entering the ping command, you must specify a destination. You can enter a website like google.ca or an IP address after the ping command. 

The result above displays a successful ping command. We used the ping command to test connectivity to google.ca, and it displayed the time it took for the ping command to reach google.ca and return to our device. Note that the standard use of the ping command in Windows will only test 4 times.You can extend the test indefinitely by adding -t at the end of the command, like so:

The ping function will continue to run until halted by the user. You can enter the CTRL+C combination to halt the test. Once halted, the results will be displayed:

macOS 

The process for a ping command on an Apple device is similar to a Windows device, but you’ll need to use Terminal instead of Command Prompt. Terminal is located in Applications -> Utilities. You can also open it by typing “Terminal” in the search bar (or spotlight).

Once opened, you’ll enter the “ping” command and its destination, like so:

Unlike Windows, the macOS ping command continues indefinitely until halted. You can use the function+c command to halt the ping test.

Linux

The ping command for a Linux device is also very similar to a macOS device. Open the Terminal application by entering Ctrl+Alt+T. Once done, enter the ping command and its destination:

Like a macOS device, you can use the Crtl+C command to halt the test, as it will run indefinitely. 

Was this article helpful?

What is packet loss?

How can I use the traceroute command?

Contact