Pre-configure Wifi on a headless Raspberry Pi Zero

After setting up the OS on the memory card, you should have 2 partitions mounted from your memory card :
– Boot partition
– Root partition

~$ mount | grep mmc
/dev/mmcblk0p1 on /media/ron/boot type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
/dev/mmcblk0p2 on /media/ron/8a9074c8-46fe-4807-8dc9-8ab1cb959010 type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)

On the root partition, edit the wpa supplicant configuration file :

~$sudo vi /media/ron/8a9074c8-46fe-4807-8dc9-8ab1cb959010/etc/wpa_supplicant/wpa_supplicant.conf

And add the following lines at the end of the file :


Adjust the SSID and password, and you’re done.

Leave a Reply

Your email address will not be published. Required fields are marked *