19

How to force Network Manager in Ubuntu to rescan wireless connections?

After closing my laptop, network manager does not see new wireless connections. Is there any bash command to force rescan? sudo service network-manager restart does not help.

25
sudo iwlist interface scan

Where interface is the name of your wireless card, e. g. wlan0

  • use sudo ifconfig to find out the name of the "interface" – Bhikkhu Subhuti Aug 26 '16 at 10:58
  • Do you really need to use sudo for this? – Morten Jul 12 '17 at 8:04
  • @Morten: Yes, we do need sudo. "Triggering scanning is a privileged operation (root only) and normal users can only read left-over scan results." (man iwlist) – Falko Aug 8 '18 at 9:26
11

Try

nmcli device wifi rescan

and

nmcli device wifi list

to see available networks

  • 1
    Best answer. Without using sudo. – Khurshid Alam Jul 5 '17 at 6:17
  • 1
    This should be the accetpted answer. It is, after all, the "command-line tool for controlling NetworkManager". It gives a nice graphical command-line output if you specify list (or no argument at all). – Mike S Oct 31 '17 at 12:06
2

In Ubuntu 16.04 and newer, restarting NetworkManager with sytemctl works (at least after scanning the networks manually with iwlist):

# Find the name of the network interface, e.g. wlan0 or wlp3s0
ip addr show      

# Scan for WLAN networks (replace wlan0 by the correct interface)
sudo iwlist wlan0 scan

# Restart Ubuntu’s Network Manager so it reloads the Access Point list
sudo systemctl restart NetworkManager
1

sudo /etc/init.d/networking restart should work...

1

Simply deactivating and reactivating your wireless module would be a workaround.

  • -1. Though this naively seems like a decent solution, it eventually led me to hard-block my network card for the weekend. – Abhishek Divekar Feb 12 '17 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.