Today, Let's learn about one of the basic but very useful networking tools i.e. ping. Also, we will see "How to ping Google in Windows 10 and Linux".
As an IT professional, Ping is the tool, which I use very frequently. You have also used it sometime in your lifetime. If not, I will let you know, how you can use ping command in various ways to check network connectivity. For example, check your internet connectivity, DNS resolution, network latency and troubleshooting.
This post is actually for newbies, which are new to networks. Let's understand quickly some details around ping tool and then we will look into how to use the ping command to check network connectivity.
What is ping
PING (Packet InterNet Groper) is a software utility that helps to test the host (other computer or node) reachability over IP protocol. In a layman language, If you want to check whether your internet is working or not. You can simply use the ping tool. We will see some examples later in this post.
How to Ping Google to check the Internet
There are many ways to check your network or internet connectivity. Depending upon your operating system like Windows 10 or Linux. You can run ping Google command to check it.
Let's see one by one, how to ping google from Linux and Windows 10. I will use Ubuntu 20.04 as a Linux system for this post.
1. How to ping Google in Linux (ubuntu 20.04)
You would need terminal access to ping any website and check whether you internet is working fine or not.
How to ping Google from terminal
Step1.1 Open Terminal by pressing <Ctrl + Alt + T> on your keyboard
Step1.2 Run Ping command.
For example, ping google.com or google.co.in
$ ping google.co.in
In this output, you can see my internet is working fine. Because I am getting ICMP (internet control message protocol) reply from "google.co.in" website.
Let me explain you "How to read a ping test" with possible scenarios.
Whenever you start pinging google in Linux terminal, it keeps sending packets until you press <Ctrl + C> on your keyboard to stop the packet communication. Unlike windows, where you give the ping "-t" option for the continuous ping.
In the sample output highlighted -
- Google IP is 126.96.36.199
- 64 bytes of data is sent in each packet
- Bom12s11-in-f3.1e100.net is the hostname of Google server
- Icmp_seq is the sequence of packets sent to Google. For example, there are 5 packets sent in a sequence in the image before I pressed <Ctrl + C>.
- TTL (Time To Live) value, represents the number of hops that a packet is set to exist, in a network before discarded by the router. In simple terms, the life of packet in a network.
- Time represents latency. For example, the image shows time=62.5 ms, 56.8 ms etc. Latency is the time, a single packet took to reach and came back from the Google server.
Finally, there is final statistics or summary as shown in the image. For example, 5 packets sent (transmitted), 5 received and there is 0% packet loss. Then, there is the min/avg/max/mdev time provided for RTT (Round Trip Time).
2. How to ping Google in Windows 10
If you have Windows 10 in your system. Then you can ping websites like Google and check internet connection in cmd.
How to ping Google using cmd
Follow these simple steps -
Step 2.1 Open cmd (command prompt)
Press <Windows key + R> and then type "cmd" in Run dialogue box.
Alternatively, You can search "command prompt" in search bar of windows 10 > Then click open.
Step 2.2 Ping website like Google using cmd
In Windows 10, Ping command will not run continuously. It will stop automatically after transmission of 4 packets as shown in image.
C:\ ping google.com
If you want to run Ping Google.com continuously, then you should use "-t" option with ping command.
C:\ ping google.com -t
There may be a case when your DNS (Domain Name System) is not working. So, If you want to ping Google IP to check your internet connection. You can ping Google DNS servers 188.8.131.52.
C:\ ping 184.108.40.206
If you want to send specific number of ICMP packets. For example if you want to ping Google 50 times, Run ping command with "-n" option.
C:\ ping -n 50 google.com
How to fix ping website failure
In case you are trying to ping any website but getting Request timed out or Host unreachable error. it means there is some issue with your network or internet connection. To fix this website failure, Follow these steps -
- Try to check the internet on another computer or laptop, if the issue persists
- Reset or restart your internet router
- Try to connect the internet cable directly to your laptop or desktop from router. In case you are connected using wireless
- Check your system firewall or security software
- Check with your Internet service provider, in case the above-mentioned steps are not working.
We learned "how to ping google" and check the internet or network connectivity. I like pinging Google, Which website you ping to troubleshoot your network? Please comment and let me know.
See you soon in the next post.