Whenever I restart my WiFi router, Ubuntu tries to connect to my neighbours' WiFi networks. There's over 30 wireless networks in the area. Ubuntu prompts me for the password to all of those. This is annoying.

Is there a way to stop Ubuntu trying to automatically connect to WiFi networks?

  • These answers no longer apply in Ubuntu 18, since there have been some interface changes. – becko Nov 8 '19 at 9:16

Click on Wi-fi Icon >> Edit Connections >> Then, Click On Wireless Tab, Delete The Wireless Connections That You Don't want to Use or You Want Ubuntu To Stop Automatically Connecting To Them.

| improve this answer | |

I'm updating this answer to reflect new images, since this was done on a laptop.

Click on the wireless icon on the top bar as shown in the image below, and

enter image description here

Then clock on Edit Connections.

enter image description here

Once the window opens, click on the wireless tab, and then click on the Edit button.

enter image description here

Unckeck the connect automatically radio button, and click Save. At this point you need to reboot your system

enter image description here

Once rebooted, you can see from the image below, that the wireless network is not connected. You have to enable it to be able to use it.

enter image description here

Now the wireless network can be enabled/disabled from terminal, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below to list all devices.

rfkill list

To block wireless, you type:

rfkill block <device_number>

To unblock you type:

rfkill unblock <device_number>

as shown in the image below.

enter image description here

| improve this answer | |
  • Do you know if it's possible to do this from the command line? – Seth May 2 '13 at 3:11
  • @Seth I have added that in my answer, and did a complete update of it. – Mitch May 2 '13 at 9:23
  • So soft blocking the WLAN will disable the auto connecting? Does this have any other consequences? – Seth May 3 '13 at 3:26
  • @seth From trying it, and playing with for a while, I have to say that it doesn’t have any problems. – Mitch May 3 '13 at 5:48

It seems like a gaping security hole, but Ubuntu does not seem to have a means of preventing connection to open networks while continuing to connect to those that you have designated safe (by checking the "automatically connect" button as others have described).

| improve this answer | |

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.