There are a number of ways to check whether or not your internet connection is actively working. The ping command happens to be one of the most common methods to do so.
How to use it? Read on to find out.
What is the ping command?
The ping command operates by sending Internet Control Message Protocol (ICMP) messages to a remote host and then waiting for a response.
The command then takes note of the time in which the request came back (called latency) and the number of requests that come back.
Apart from being used to check the internet connection of the host machine (the machine you’re using), it also is used to monitor if a remote client is connected to the internet or not.
It is a terminal command available on Windows, Linux and Mac alike.
Also read: How to pause Windows 10 update? Here are 4 ways that might help
How to use the ping command to check your internet connection?
In this post, we’ll guide you through how you can use the ping command to check if your internet connection is working. Please note that while we’re using Windows 10 in this example, the format is the same for Linux and Mac.
Step 1: Open the command prompt. To do so, you can either –
- Press the Windows key + R, then type CMD and press enter
- Right click on the Windows logo on the left side of the taskbar and select ‘Command prompt’. (please note that this has been replaced by Windows PowerShell in the latest update to Windows 10. The ping command will still work though)
- Open the Start menu and search for ‘Command Prompt’
Step 2: OR type in ping and then enter a web or an IP address of the remote host that you’d like to ping.
For example, ping www.google.com if you want to ping Google. Or maybe, ping 192.168.1.26 where the ping command is followed by an IP address which points to the remote host.
Step 3: And that’s it. If your internet connection is working, and your remote host is online as well, you should see something like this on your terminal –
In case your remote host is not connected, you’ll see that the ping command sent requests to the remote host but didn’t receive anything back. This generally means that your internet connection is fine, but the remote host you’re trying to ping is offline.
You’ll see something like this in this case –
Finally, if your machine is not connected to the internet at all, or there’s an issue with your internet connection, the ping command won’t be able to reach the destination host.
You’ll see something like this –
You might also get this error when you enter a wrong destination address. So be sure to cross check the address once again before declaring your internet connection dead.
Extension to the ping command
The ping command has a lot of built-in options. These options are called switches and allow you to do all kind of things with your ping requests.
Enter ping /? in the command prompt, and you’ll be provided with a list of all the switches along with a brief description of what they do.
Please note that even if the ping command is available across operating systems, the formats and switches vary. The ping /? command and the switches it describes are only applicable to Windows.
Also read: How to view HDR videos on Windows 10 PC