Skip to content

Instantly share code, notes, and snippets.

@LennartHennigs
Last active July 16, 2020 18:28
Show Gist options
  • Save LennartHennigs/e557f44246defe45f7b732fd5fdcb4d8 to your computer and use it in GitHub Desktop.
Save LennartHennigs/e557f44246defe45f7b732fd5fdcb4d8 to your computer and use it in GitHub Desktop.
  • Download latest Raspberry Pi OS Desktop
  • Flash to SD card (at least 8GB) via Etcher
  • open Terminal or iTerm on your Mac and run the following command (it will enable ssh and copy the premade wifi config file to the SD card):
  bash <(curl -s https://gist.githubusercontent.com/LennartHennigs/e557f44246defe45f7b732fd5fdcb4d8/raw//setup_mac.sh)
  • ...
##!/bin/bash
#
WHITE="\033[1;37m"
NORMAL="\033[0m"
#
echo ""
printf "${WHITE}ENABLE SSH${NORMAL}\n"
cd /Volumes/boot
touch ssh
printf "${WHITE}ADD WIFI${NORMAL}\n"
curl -s https://gist.githubusercontent.com/LennartHennigs/e557f44246defe45f7b732fd5fdcb4d8/raw/wpa_supplicant.conf > wpa_supplicant.conf
printf "${WHITE}DONE.${NORMAL}\n"
echo ""
printf "${WHITE}NOW EJECT THE SD CARD...${NORMAL}\n"
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DE
network={
ssid="WiFi Name"
psk="WiFi Password"
key_mgmt=WPA-PSK
priority=1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment