Do You Have Internet Access?

This page is a how-to to determine the answer to the question:

Do you have access to the internet?

The answer will be 'yes' or 'no'.

Steps to Answer

Run this command in a terminal:

ping -c2

The output should return within a second and look like this:

PING ( 56 data bytes
64 bytes from icmp_seq=0 ttl=120 time=19.188 ms
64 bytes from icmp_seq=1 ttl=120 time=11.667 ms

— ping statistics —
2 packets transmitted, 2 packets received, 0.0% packet loss

round-trip min/avg/max/stddev = 11.667/15.427/19.188/3.761 ms

  • The emboldened text should match exactly
  • The times in milliseconds (time=(?) ms) above should be less than 100 ms

If the above items are true, then the answer is 'yes', you have internet connectivity.

If the time in milliseconds is greater than 0.1, then you have internet connectivity, but note that it might be performing poorly. Go to Degraded connection? below

Further Steps

To determine whether you have a degraded internet connection, run this command:

ping -c60

This should take about a minute to run.

The key line to consider is this one:

round-trip min/avg/max/stddev = 22.182/75.171/160.415/52.970 ms

If the average is 'too high', or the standard deviation is 'too high' then your connection is degraded.

If the max is 'too high' you may be intermittently experiencing problems.

You may want to re-run the command over a much longer time to determine whether the network is degraded intermittently.

You could leave a comment if you were logged in.