I'm trying to setup my wireless on a raspberry pi 4 running raspbian, and I'm making changes to the wpa_supplicant.conf file per other answers here on Stack Exchange. However, after I make the changes to the file and reboot or turn wireless off/on, the changes I made to the file disappear. Why aren't my changes persistent?

I did confirm that the changes were written to the file after exiting nano using more on the file.

  • Is there another wpa_supplicant.conf on /boot? That gets copied in under some circumstances, replacing the one in /etc/...
    – Jim Danner
    Nov 17, 2019 at 1:46

2 Answers 2


It is unclear what WiFi configuration do you use but wpa_supplicant has the ability to configure itself and find some necessary options. It will store these settings for next use in /etc/wpa_supplicant/wpa_supplicant.conf, the one that you try to edit. This is what the option


allows. Set it to update_config=0 and wpa_supplicant will never change its configuration.

  • This makes perfect sense. Thank you for taking the time to comment on my issue. Nov 18, 2019 at 3:52
  • 1
    @Ingo well I have the same problem , but even when I change "update_config=1" to "update_config=0" , it still reverts back to what it was before , even the "update_config=0" is changed back to "update_config=1".
    – Hitman2847
    Mar 5, 2021 at 15:18
  • @Hitman2847 Do you find some modifications in wpa_supplicant.conf?
    – Ingo
    Mar 11, 2021 at 18:30
  • @Ingo yes but only the ones system made
    – Hitman2847
    Mar 11, 2021 at 20:27

I've a doubt in your question here. Only changes are disappeared or the whole content gets disappeared? If the whole content is disappeared, it is a common problem which might be solved by setting the wifi-country and region correctly or by setting following things correctly:



Here change the US with 2 letters of your country code. This might help.

  • The first three lines were originally in the file (with the correct country code), and they remain after my addition for the network disappears after reboot or toggling wifi off/on. I’ve “solved” the problem by changing my router to broadcast the SSID and connecting via the GUI. Nov 17, 2019 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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