enable wifi raspberry pi headless code example

Example 1: raspberry pi set wifi headless

crate a file in the root folder of the sd card ("boot") called 
wpa_supplicant.conf
===========contents of file:=================
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=

network={
 ssid=""
 psk=""
}

Example 2: enable wifi raspberry pi headless

Make new file /boot/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country="{Your countries' ISO 3166-1 code}" 

network={
 ssid="{Name of Network}"
 psk="{Password}"
}

Tags:

Misc Example