How to force Network Manager to rescan connections?

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.


sudo iwlist interface scan

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


Try

nmcli device wifi rescan

and

nmcli device wifi list

to see available networks


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

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