How to check wifi connection without using ping in linux?

4

1

Basically I want to check if the computer is connected to the wifi (router) using a command line command. Ping is usually used to check internet connection, but I only want to know if is connected to the router, not about internet connection. I am using wicd as a network manager.

Thank you

milarepa

Posted 2013-09-04T17:55:23.823

Reputation: 269

2Ping your router then. – terdon – 2013-09-04T17:56:19.303

Thanks, but I believe iwconfig is faster, as the information will go on a loop (text status bar). – milarepa – 2013-09-04T18:08:17.640

Answers

3

The easiest way would be to ping your router, something like ping 192.168.1.1.

Alternatively, you can run ifconfig and check if you have an IP address. You can also do this with iwconfig and look for an ESSID.

terdon

Posted 2013-09-04T17:55:23.823

Reputation: 45 216

3

I believe that Wavemon should work for you.

Install:

  • Ubuntu/Debian:

    # apt-get install wavemon 
    
  • Fedora/CentOS/Red Hat:

    # yum install wavemon
    

Starting to use # wavemon.

enter image description here

stderr

Posted 2013-09-04T17:55:23.823

Reputation: 9 300

1Thanks, but I was thinking to get the information as standard output, as I needed for an all text status bar. – milarepa – 2013-09-04T18:06:38.587