Technology and General Blog

When operating on Linux Servers where we do not have any GUI of Linux and have accessibility to the terminal from exactly where we have to control the entire server, it becomes tricky to diagnose web connectivity challenges. As a result, this article contains several approaches and presents a comprehensive information on how to test the online connectivity in Linux Terminal.

Approach 1: PING Command

The most effective and foremost way is to examine the online availability via the PING command.

The PING command is made use of for sending and getting offers from and to some external/distant server.

As an illustration, we will try to mail three online deals to the Google server and test the world-wide-web connectivity if we will be ready to receive the net packets from the Google server.

In the output, you can also witness that the three deals are transmitted and received. Again, this is simply because pinging to the Google server went productive.

Process 2: CURL Command

A different way to verify the internet relationship is as a result of the CURL command.

The CURL command is made use of to download, add, or transfer the facts about the network from or to the server. It supports many protocols, and we can use it to verify the world wide web connectivity by connecting to and fetch the headers. If the headers are fetched successfully, that implies the web is functioning in any other case, there is a difficulty.

$ curl -I

If you get the position 200 Okay and the website’s headers, the world wide web link is operating perfectly great.

These are the methods to test net connectivity.

Diagnose the Difficulty

If the net is not linked utilizing any of the higher than solutions, you can use the IP command to look at whether there is a trouble in the gateway settings or community interface.

To get the IP handle of your system assigned by the community adapter, use the command presented beneath:

To get the default gateway IP tackle, use the “ip r” command:

And try out to ping to the default gateway working with the PING command:

If pinging goes unsuccessful, it indicates there is a trouble with the gateway options, and you have to have to reconfigure them. If not, the gateway configurations are high-quality, but the internet is not doing work from the internet assistance service provider end.


This submit consists of a profound tutorial on how to test the net connectivity in Linux terminal and how to diagnose the trouble. PING command is precisely made use of for pinging uses, as its title is expressing, while CURL command is employed to transferring the data above the community. Using the “ip” command, we can diagnose the difficulty. Both there is a problem in the default gateway, DNS server resolution, Network adaptor, or ISP (net assistance company).

Leave a Reply

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