I am trying to locate the wpa_supplicant.conf on Ubuntu 14.04 with no luck. I tried to locate but I couldn't find it. the locate command gives the following output:

~$ sudo locate wpa_supplicant.conf  

I am connected to my Wi-Fi so there must be a wpa_supplicant.conf file present, right? If so, why am I unable to locate it?

  • 1
    After years of fighting it for simple network connections, I'd honestly recommend just letting Network Manager handle things these days (especially when it comes down to wireless security). – Oli Jul 14 '14 at 10:01
  • I'm just seeing (and want to play with) the WiFi source code and want to give the computer my own wpa_supplicant. I want to backup the original just in case something messes up. – Pervy Sage Jul 14 '14 at 14:26

If you use NetworkManager to configure your wifi connections look in /etc/NetworkManager/system-connections

There should be files in there for all your configured network connections.

  • 4
    But where's wpa_supplicant.conf? – James McLaughlin Sep 1 '15 at 22:30
  • If you use NetworkManager it looks after wireless settings for you. It doesn't create a wpa_supplicant.conf file with all the network settings in it. It stores connection settings in a bunch of connection files. – coderpatros Sep 3 '15 at 21:55

wpa_supplicant doesn't run with a conf. It's a daemon that communicates with your network manager using DBUS. You can see what's happening with wpa_cli which will show you the instructions being received by the daemon.

That's not to say you can not run with a configuration file, you can. But, Ubuntu doesn't use that configuration file at all. It's all remotely controlled through the DBUS api.


The specific answer to the question "Where is my wpa_supplicant.conf?" is as follows:

Method 1:

Copy a specimen file from /usr/share/doc/ to /etc as per README instructions in line 262 in /usr/share/doc/wpasupplicant/README.Debian.gz :

# copy the template to /etc/wpa_supplicant/
cp /usr/share/doc/wpasupplicant/examples/wpa-roam.conf /etc/wpa_supplicant/wpa_supplicant.conf

# allow only root to read and write to file
chmod 0600 /etc/wpa_supplicant/wpa_supplicant.conf

I found the README file- and the specimen files to create a wpa_supplicant.conf - with:

dpkg -L wpasupplicant

Above answer produced from an Ubuntu 18.04 system.

Method 2

Put the following into a script, edit the directives with values specific to your setup, chmod 700 the file and execute it. It's minimal, but should suit most use cases. This should do all the related grunt work to get your wpa_supplicant configured.


cat <<EOF> /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev


chmod 0600 /etc/wpa_supplicant/wpa_supplicant.conf

usermod -G netdev -a pi

systemctl unmask wpa_supplicant.service
systemctl enable wpa_supplicant.service
systemctl start wpa_supplicant.service

Hope this helps you

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.