// ITS FOSS — LINUX & OPEN SOURCE
How to Change Raspberry Pi Wi-Fi Details From the SD Card
If your Raspberry Pi can no longer connect to Wi-Fi because the SSID or password changed, you can update the Wi-Fi configuration directly from its SD card. This helps when you cannot connect the device to a monitor and keyboard.
That's what I did. I had switched to a different internet provider, and that changed the router, its SSID and the password. I was using a Raspberry Pi Pico W in my Pi Dog. Connecting it to a screen and keyboard would have been a pain.
The easier option was to just take out the SD card and edit the WiFi details directly there. The entire process is composed of the following step:
Shut down the Raspberry Pi, remove the microSD card, and insert it into your Linux laptop or desktop using an SD card reader.
The Wi-Fi configuration is stored inside the rootfs partition.
If you only see bootfs, mounted, you can mount rootfs from the file explorer.
As you can see, for me, the Raspberry Pi root filesystem is available at:
Recent Raspberry Pi OS releases store NetworkManager connection profiles here:
Since we are accessing Raspberry Pi OS through its SD card, run:
If you already see a .nmconnection file, you can edit that file.