5

Check if the residence's connection has internet access

view full story
linux-howto

http://unix.stackexchange.com – I'd like to be able to test if I have access to the internet. My computer is connected to the residence internet connection. I thought of using ping like this: ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || echo error But this does not work! As I said the connection is provided by a residence(which is actually just forwarding the university connection). To have access to the internet you must open a web browser where you are requested user name and password and only then the internet access is granted.(I really have no clue about networks con (HowTos)