3

To scan all available wifi networks, this command is often used :

sudo iwlist wlp2s0 scan

The problem is that you need root privileges. But if you go to Settings/Wi-Fi, you can see the list and properties of Wifi networks even without being sudo.

How is it done ? What is the command used to achieve that ?

1
  • Does the iwlist command need sudo?
    – Jeremy31
    Jun 8, 2019 at 11:52

2 Answers 2

1

I am not sure if you missed this simple command or I understood your Question wrongly..

nmcli device wifi list does not require sudo..

Example:

pratap@i7-4770:~$ nmcli device wifi list
IN-USE  SSID         MODE   CHAN  RATE        SIGNAL  BARS  SECURITY 
*       Sri Nilayam  Infra  11    270 Mbit/s  54      ▂▄__  WPA2     
pratap@i7-4770:~$ 

from man nmcli

Some content:

   wifi [list [ifname ifname] [bssid BSSID]]
       List available Wi-Fi access points. The ifname and bssid options can be used to list
       APs for a particular interface or with a specific BSSID, respectively.
6
  • For me, nmcli only founds the network I am connected to Jun 7, 2019 at 15:52
  • I use Ubuntu 18.04 Jun 7, 2019 at 16:27
  • I have a standard account, that is the point of my question, I don't want to run the commands with root privileges Jun 7, 2019 at 17:14
  • I didn't want to sound aggressive :) Jun 7, 2019 at 17:21
  • I don't see any differences. Jun 7, 2019 at 17:26
0

If you want to see all the AP's around you, should disconnect from your own AP first, then run nmcli.

nmcli -f ssid,bssid,freq,chan,signal,security,wpa-flags,bars dev wifi list

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .