Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I persistently prevent a wireless interface using wpa_supplicant in roaming mode from connecting to a particular open network foo?

This doesn't work:

$ sudo wpa_cli
> blacklist 00:11:22:33:44:55

Nor does the following:


allow-hotplug wlan0
iface wlan0 inet manual
  wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf


share|improve this question
up vote 3 down vote accepted

You can set the option disabled=1 in the corresponding network entry in wpa_supplicant.conf. This will prevent wpa_supplicant from automatically connecting to the network (it'll still try to connect to it if you specifically ask it to do so).

share|improve this answer
where is this file on debian Jessie? – Dr Beco Jul 5 '15 at 21:45
Usually it's /etc/wpa_supplicant/wpa_supplicant.conf – lgeorget Jul 6 '15 at 17:45
Thanks Igeorget. The directory exists and there are some scripts there, but no wpa_supplicant.conf. Maybe there is no configuration file at all in the default installation for Debian Jessie? – Dr Beco Jul 6 '15 at 17:52
Hmm I guess not. You probably have to create it. You could look for an example in /usr/share/doc/wpa_supplicant... But the easiest is probably to use a graphical tool to configure your network such as NetworkManager or wpa_cli. – lgeorget Jul 6 '15 at 17:57
Here, it does not work in the presence of a catch-all entry; see this question about it. – Joachim Breitner Aug 14 '15 at 18:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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