LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 12-20-2017, 02:00 AM   #1
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Rep: Reputation: 15
internet connectivity


What is the proper command to confirm that system has internet connectivity ?

wget
ping
curl
or what ?

How do you test if your Ubuntu system has internet connectivity ?
 
Old 12-20-2017, 02:11 AM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
There are a number of ways to see if you are connected. I don't know if there is a "proper" way. I usually just ping google
 
Old 12-20-2017, 02:18 AM   #3
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TheEzekielProject View Post
I usually just ping google
okay. I did this

$ping google.com
PING google.com (172.217.9.14) 56(84) bytes of data.
//output hangs


is it internet connected ? Yes / No ?

Last edited by Volcano; 12-20-2017 at 02:19 AM.
 
Old 12-20-2017, 02:25 AM   #4
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
Try
Code:
ping -c 2 www.google.com
Your command should at least time out. Might take a minute or two, but it should at least fail or succeed

EDIT: Here is what I get as output with the same command
Code:
ping -c 2 www.google.com
PING www.google.com (172.217.3.196) 56(84) bytes of data.
64 bytes from sea15s12-in-f4.1e100.net (172.217.3.196): icmp_seq=1 ttl=54 time=8.24 ms
64 bytes from sea15s12-in-f4.1e100.net (172.217.3.196): icmp_seq=2 ttl=54 time=8.12 ms

--- www.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 8.129/8.189/8.249/0.060 ms

Last edited by TheEzekielProject; 12-20-2017 at 02:28 AM.
 
Old 12-20-2017, 03:03 AM   #5
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TheEzekielProject View Post
Try
Code:
ping -c 2 www.google.com
Your command should at least time out. Might take a minute or two, but it should at least fail or succeed

EDIT: Here is what I get as output with the same command
Code:
ping -c 2 www.google.com
PING www.google.com (172.217.3.196) 56(84) bytes of data.
64 bytes from sea15s12-in-f4.1e100.net (172.217.3.196): icmp_seq=1 ttl=54 time=8.24 ms
64 bytes from sea15s12-in-f4.1e100.net (172.217.3.196): icmp_seq=2 ttl=54 time=8.12 ms

--- www.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 8.129/8.189/8.249/0.060 ms
Yup . In your case you get the output but in my case output hangs . What does that mean ?
 
Old 12-20-2017, 03:11 AM   #6
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
-c 2 just tells ping how many packets to send, where your command will send packets until interrupted with ctrl+c. Other than that, the only difference is I have the www. and yours doesn't. I imagine that's the reason your command failed before.

The "2 packets transmitted, 2 received, 0% packet loss" is the relevant part, it shows 2 transmitted, 2 received, No packet loss. That indicates you are connected.
 
Old 12-20-2017, 04:14 AM   #7
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TheEzekielProject View Post
Other than that, the only difference is I have the www. and yours doesn't. I imagine that's the reason your command failed before.
ok. Now I am doing similar to yours ..

$ping -c 2 www.google.com
PING www.google.com (216.58.218.164) 56(84) bytes of data.
//output hangs.



What does that mean ? why output hangs ?

what I'm trying to find here is : Is it issue with internet connectivity or firewall blocking ? how to find it out ?

Last edited by Volcano; 12-20-2017 at 04:20 AM.
 
Old 12-20-2017, 04:38 AM   #8
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 656

Rep: Reputation: 190Reputation: 190
Try adding a "-v" to your command to get verbose output. Let it run in a separate terminal. It's resolving google to an ip which is good so let it run a few minutes and see what else it tells you
 
Old 12-20-2017, 05:17 AM   #9
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TheEzekielProject View Post
Try adding a "-v" to your command to get verbose output. Let it run in a separate terminal.
you mean this

$ping -v www.google.com
PING www.google.com (216.58.218.100) 56(84) bytes of data.
//output hangs
 
Old 12-20-2017, 05:44 AM   #10
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,987

Rep: Reputation: 1239Reputation: 1239Reputation: 1239Reputation: 1239Reputation: 1239Reputation: 1239Reputation: 1239Reputation: 1239Reputation: 1239
Isn't this just a copy of your other thread? https://www.linuxquestions.org/quest...ll-4175619000/
 
Old 12-20-2017, 06:59 AM   #11
Volcano
Member
 
Registered: Sep 2005
Posts: 221

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by TenTenths View Post
Isn't this just a copy of your other thread? https://www.linuxquestions.org/quest...ll-4175619000/
that thread had some deviation to the actual problem and inconclusive
 
Old 12-20-2017, 07:03 AM   #12
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,302
Blog Entries: 13

Rep: Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696Reputation: 3696
Quote:
Originally Posted by TenTenths View Post
Isn't this just a copy of your other thread? https://www.linuxquestions.org/quest...ll-4175619000/
TenTenths is correct.

Please post your question once. While the questions are different in verbiage, it seems clear the goal is to diagnose internet connectivity. Please continue to work with members in your original thread.

I've closed this thread.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
monitor internet connectivity sumeet inani Linux - Newbie 1 05-14-2012 03:40 AM
Internet Connectivity In KNOPPIX pg13 Linux - Newbie 6 04-07-2009 07:58 AM
Lost internet connectivity wremote SUSE / openSUSE 3 03-19-2005 11:03 AM
No Internet Connectivity laltupi Linux - Networking 1 07-19-2004 11:34 AM
Internet Connectivity is a NO-GO Help Please!! ClericPreston Linux - Newbie 1 06-04-2004 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration