#Headless Setup of Raspberry Pi Zero W (Raspberry Pi 3 Wireless) (macOS)
- Formatt the Micro SD card - Open a terminal and type 'diskutil list'. Find your card and copy the disk name (For example: /dev/disk4). Format the card with
diskutil eraseDisk ExFat temp disk4(Use your disk here)
- Download Raspbian -
wget https://downloads.raspberrypi.org/raspbian_lite_latest
- Unmount the SD card -
diskutil unmountDisk /dev/disk4
or whatever your disk path is - Mount the Raspbian image to the card -
sudo dd if=PATH-TO-RASPBIAN-IMAGE
of=/dev/disk4` or whatever your disk path is - Enable SSH on the Pi -
cd /volumes && ls
. You should see a boot partition from the SD cardcd boot && touch ssh
- Setup WiFi on the PI - While still in the boot partition of the card type
nano wpa_supplicant.conf
and enternetwork={ ssid="YOUR-SSID" psk="YOUR-WIFI-PASSWORD" }
- Boot the PI - Unmount the card
diskutil unmountDisk /dev/disk4
(or whatever your disk path is) and put it in the Pi, then power up the Pi - SSH Into the Pi - Find the Pi's IP on your network by running
arp -a
or using an app like LanScan and ssh into itssh pi@YOUR_PIS-IP
. THe default password israspberry
- Add your SSH key to the PI - While in the Pi run
install -d -m 700 ~/.ssh
. On you machine runcat ~/.ssh/id_rsa.pub | ssh <USERNAME>@<IP-ADDRESS> 'cat >> .ssh/authorized_keys'
YouTube video of this setup: https://www.youtube.com/watch?v=Ct9XwyYvmbU
Sorry to hear that...
Can you reformat the SD card on your Mac and then run dd to flash the OS image again?
If after dd finishes you don't see a dir named "boot" in the "/Volumes" dir then pull the sd card out and put it back in. You may also not see it if you had another volume that was named "boot" and it was not ejected before you removed it. Just look in finder and see if there is a drive showing up after dd is done.
I am fixing the download link. It should be"
https://downloads.raspberrypi.org/raspbian_lite_latest
I hope you get it working!