![test internet connection test internet connection](https://www.komando.com/wp-content/uploads/2017/09/internet-speed-test.jpg)
# nslookup įor a failed DNS lookup you should get something like # nslookup 1 With a successful DNS lookup you should get a response something like below. You can perform a DNS lookup any web page address to check if connected to internet. Then your linux node is not connected to internet.Īlternatively you can also use # echo -n >/dev/tcp/8.8.8.8/53 echo $? bash: /dev/tcp/8.8.8.8/53: Network is unreachable If the output is 0 then it means you are connected to internet, but if the output is something like below # cat /dev/tcp/8.8.8.8/53 echo $? Alternatively you can use below command to check if connected to internet without installing any additional rpm # cat /dev/tcp/8.8.8.8/53 echo $?
#TEST INTERNET CONNECTION INSTALL#
But many of them are not installed by default so you may have to install them manually. There are various tools which can be used to check port availability which I will share in this article. You can use other commands from this article to check if connected to internetĢ. If your system is using proxy server to connect to internet then ping check will not work. Now check the statistics section, we see 1 packet was transmitted and received and there was 0% packet loss so it means we are connected to internet. Here we use -c 1 with ping tool to send only one packet. To perform ping check, try to ping any page on internet such as # ping -c 1
![test internet connection test internet connection](https://i.ytimg.com/vi/SRFcWCRFCJk/maxresdefault.jpg)
#TEST INTERNET CONNECTION HOW TO#
But do you know how to check ping or perform ping check to check if connected to internet? Ping is part of iputils rpm so make sure iputils is installed on your setup The very first tool I use to check if connected to internet is via ping utility. Now there are multiple commands which are available in Linux which can be used to check if connected to internet, we will try to discuss some of them here in brief. If you are on virtual machine then make sure your VM is configured to be able to connect external network.Your gateway is reachable from the Linux system.You have IP Address assigned to your network interface (static or dhcp).