Ping is the standard tool to check the network connection. This tool is available on major operating systems from Windows, Linux to macOS. The way this tool works on each operating system is not different. After you executed ping on the terminal, it will send packets of data to a specific IP address on a network and then lets you know how long it took to transmit that data and get a response.
Using ping is extremely easy since all you need to do is type
pingon the terminal followed by an IP address or domain name. Regardless the operating system you use. For instance, if you want to check the network connection between my machine and the server computer of bettertechtips.com, so you need to type
The basic use of ping is the same on Linux, Windows and macOS. But still, there are some details differing them. For instance, if you execute
ping bettertechtips.comon Linux, ping will keep pingin until you stop it (by pressing the Ctrl+C button). If you execute the same command in Windows without adding any parameter, you will only get four replies. You need to add the “t” parameter in Windows to make ping keep pinging.
The major use of ping is to check the network connection (reachability) of a host on an Internet Protocol network. However, you can also use it for other purposes. Following are 3 things you can do with ping, other than testing reachbility of host.
1. Checking the internet connection
Ping is often used by computer users to check the internet connection they have. Using ping to check the internet connection is pretty simple. You just need to type
pingon the terminal followed by certain domain name, say bettertechtips.com. If you get the reply, it indicates that you are connected to the internet. You can also check the speed of your internet connection by seeing the response time. A good internet connection usually takes less than 60 milliseconds to response the packet request.
2. Checking the IP address behind a domain name
Each device connected on a network has unique IP address. Including server that runs certain website. All domain names on the internet also have a unique IP address. If you are curious, you can also check the IP address behind a certain domain using ping.
For example, if you want to check the IP address of bettertechtips.com, you can type
ping bettertechtips.comon the terminal and notice the output carefully. Right below the command (in the parentheses), you can see the IP address of bettertechtips.com.
3. Checking the network adapter on your computer
Another thing you can do with ping is to check the network adapter on the computer you are using. You can do so by pinging your loopback address (127.0.0.1).
If you can’t successfully ping your router, but pretty sure the router appears to be turned on and working, you can type
ping 127.0.0.1on the terminal (same on all operating systems). If you can successfully ping the address, it indicates that the network adapter on the computer you are using is working properly.
Sure, there are many other things you can do with ping. The three examples above are the just the basic. In case you want to be a ping master, you can read the documentation of ping on your operating system. If Linux, you can read the documentation by typing
man pingon the terminal.