I tried to follow some online tutorials to get my Pi to connect to a hidden network. I used the command:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Prompting this:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev



I ended up creating several wpa_supplicant.conf files as I was a bit confused initially what the process did. enter image description here

I have several of these files and I don't need them anymore. I tried to delete them manually just to see what would happen and I got a permission denied warning. On top of that, I wasn't able to even connect to my hidden network, so I ended up making it visible and connecting to it that way. If anyone has suggestions as to how I can remove the config files, or if I should just leave them be, and how I could properly access hidden networks, I would greatly appreciate it.

  • 1
    I cannot "read" the pictures. Please paste text output direct into the question. – Ingo Oct 22 '19 at 8:25
  • You should not play around that section without having a clear info. That could crash you r network interface – Sohan Arafat Oct 24 '19 at 6:25

To delete restricted files you can use rm in combination with sudo (execute with root rights). So to delete wpa_supplicant.conf you can execute on the command line:

rpi ~$ sudo rm /etc/wpa_supplicant/wpa_supplicant.conf

Repeat that with the names of the other files you want to delete. But you need wpa_supplicant.conf to connect to the hidden access point. Just recreate /etc/wpa_supplicant/wpa_supplicant.conf with the content you have shown in the question. That should do.


It is difficult to see what you have done (post text not illegible pictures) or how you actually created multiple files, but /etc/wpa_supplicant/wpa_supplicant.conf is owned by root.

It can easily be deleted at the command line with

sudo rm /etc/wpa_supplicant/wpa_supplicant.conf

See How to set up networking/WiFi for detail of setting up networking.

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.