[Gambas-user] Connection to the Internet ...
Tim Dickson
dickson.tim at googlemail.com
Tue Jun 15 15:46:47 CEST 2021
On 15/06/2021 14:14, Christof Thalhofer wrote:
> Am 15.06.21 um 14:49 schrieb Hans Lehmann:
>
>> I am looking for a way to find out for sure whether from my PC there is
>> currently
>> (b) also to the Internet.
> This is the easier one:
> 'ping -c 1 google.com'
>
> But you must hope that Google is alive.
>
>> (a) a connection to the local router and then
this will ping the default gateway on linux
ping -c1 `route|grep default|awk '{print $2}'`
> This is difficult:
>
> https://stackoverflow.com/questions/1204629/how-do-i-get-the-default-gateway-in-linux-given-the-destination
>
> Alles Gute
>
> Christof Thalhofer
>
--
This email has been checked for viruses by AVG.
https://www.avg.com
More information about the User
mailing list