Skip to content

Instantly share code, notes, and snippets.

@ichisadashioko
Last active October 9, 2020 06:28
Show Gist options
  • Save ichisadashioko/f950a7e9e9e198486ffeeea4d3453af0 to your computer and use it in GitHub Desktop.
Save ichisadashioko/f950a7e9e9e198486ffeeea4d3453af0 to your computer and use it in GitHub Desktop.
prepare new os for raspberry pi

Enable SSH before first boot (headless)

create an empty file with the name ssh in the boot partition

Setup Wifi before first boot (headless)

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
}
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=us
network={
ssid="<Name of your WiFi>"
psk="<Password for your WiFi>"
key_mgmt=WPA-PSK
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment