create an empty file with the name ssh
in the boot
partition
create a file named wpa_supplicant.conf
in the boot
partition. more details about wpa_supplicant
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<country-code-of-your-wifi>
network={
ssid="name-of-your-wifi"
psk="password-for-you-wifi"
key_mgmt=WPA-PSK
}
Example
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=us
network={
ssid="wifi"
psk="123456"
key_mgmt=WPA-PSK
}