Posted: . At: 9:41 AM. This was 6 years ago. Post ID: 12101
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to get WIFI information with the command line.


It is very easy to get information about wireless networks with the command line.

This example uses iwlist to view the information we need.

jason@jason-Lenovo-H50-55:~$ sudo iwlist wlan0 scan | grep ESSID
                    ESSID:"OPTUS58FFG69"
                    ESSID:"TelstraD22F23"
                    ESSID:"OPTUS58FFG69"
                    ESSID:"TelstraD22F23"
                    ESSID:"OPTUS_B8E926"

This is very good for listing WIFI networks without using Network Manager.

Get information about your wireless adapter with this command.

jason@jason-Lenovo-H50-55:~$ iwconfig
lo        no wireless extensions.
 
wlan0     IEEE 802.11abgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm   
          Retry short limit:7   RTS thr=2347 B   Fragment thr:off
          Power Management:off
 
eth0      no wireless extensions.

This Lenovo hardware allows me to list all networks, even 5 GHZ.

jason@jason-Lenovo-H50-55:~$ sudo iwlist wlan0 scan | grep Freq
                    Frequency:5.18 GHz (Channel 36)
                    Frequency:2.462 GHz (Channel 11)
                    Frequency:2.422 GHz (Channel 3)
                    Frequency:5.68 GHz (Channel 136)

This simple one-liner also allows the user to get more information from the WIFI networks around them.

jason@jason-Lenovo-H50-55:~$ sudo iwlist wlan0 scanning | egrep 'Cell |Encryption|Quality|Last beacon|ESSID'
          Cell 01 - Address: C8:14:51:5F:A9:54
                    Quality=70/70  Signal level=-19 dBm  
                    Encryption key:on
                    ESSID:"OPTUS58FFG69"
                    Extra: Last beacon: 0ms ago
          Cell 02 - Address: 10:13:31:D2:2F:23
                    Quality=42/70  Signal level=-68 dBm  
                    Encryption key:on
                    ESSID:"TelstraD22F23"
                    Extra: Last beacon: 0ms ago
          Cell 03 - Address: C8:14:51:5F:A9:50
                    Quality=70/70  Signal level=-11 dBm  
                    Encryption key:on
                    ESSID:"OPTUS58FFG69"
                    Extra: Last beacon: 0ms ago
          Cell 04 - Address: 12:13:31:D2:2F:2B
                    Quality=51/70  Signal level=-59 dBm  
                    Encryption key:on
                    ESSID:"TelstraD22F23"
                    Extra: Last beacon: 432ms ago
          Cell 05 - Address: F4:6B:EF:B8:E9:27
                    Quality=40/70  Signal level=-70 dBm  
                    Encryption key:on
                    ESSID:"OPTUS_B8E926"
                    Extra: Last beacon: 2792ms ago

This is another very good way to list WIFI networks with the command line. This also shows how many bars of signal strength each network has.

jason@jason-Lenovo-H50-55:~$ nmcli dev wifi
*  SSID                MODE   CHAN  RATE       SIGNAL  BARS  SECURITY  
   OPTUS58FFG69        Infra  3     54 Mbit/s  100     ▂▄▆█  WPA1 WPA2 
   OPTUS58FFG69        Infra  36    54 Mbit/s  100     ▂▄▆█  WPA1 WPA2 
   TelstraD22F23       Infra  136   54 Mbit/s  69      ▂▄▆_  WPA2      
   OPTUS_B8E926        Infra  1     54 Mbit/s  54      ▂▄__  WPA1 WPA2 
   TelstraD22F23       Infra  11    54 Mbit/s  54      ▂▄__  WPA2      
   Optus X Smart 2829  Infra  1     54 Mbit/s  47      ▂▄__  WPA2

These commands will help when using a Linux laptop and it is desired to know what wireless networks are available around you.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.