A concise guide for people who don’t need trivial things explained…
- Download the latest lite image from here: https://www.raspberrypi.org/downloads/raspbian/
- Identify the disk number using
diskutil list
- Unmount the disk using diskutil, eg:
diskutil unmountDisk /dev/disk4
- Clone the image to the SD card, eg:
sudo dd bs=1m if=2016-03-18-raspbian-jessie.img of=/dev/rdisk4
- Add an empty file
ssh
to the newly created drive’s boot partition should be visible at/Volumes/boot
- Eject the disk, eg:
sudo diskutil eject /dev/rdisk3
- Add the wireless configuration file
wpa_supplicant.conf
to the boot volume. (Note: it is also possible to configure this in the linux path/etc/wpa_supplicant/wpa_supplicant.conf
). See below for example. - Connect the Pi using an ethernet cable and boot from the new SD card
- Find the IP address of the Pi from the DHCP server
- Log in to the terminal using SSH (user pi, password raspberry), eg:
ssh pi@192.168.0.123
- Check which wireless networks are visible:
sudo iwlist wlan0 scan | grep ESSID
- Edit the wireless config:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
- Check if connected:
ifconfig wlan0
- Set a DHCP reservation for the MAC of the wireless adapter
- Restart the adapter (
sudo ifdown wlan0 && sudo ifup wlan0
) orpi sudo reboot
- Run
sudo raspi-config
, expand the filesystem and set internationalization options
UPDATE:
wpa_supplicant.conf now requires country code, eg:
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="MyNetwork"
scan_ssid=1
psk="s00perS3cure"
key_mgmt=WPA-PSK
}
If the Pi can’t be found on the network connect it using the ethernet port. If found that way SSH in to it, then:
- Check which wireless networks are visible:
sudo iwlist wlan0 scan | grep ESSID
- Edit the wireless config:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="MyNetwork"
psk="s00perS3cure"
}
- Check if connected:
ifconfig wlan0
Once it’s on the network you may want to:
- Set a DHCP reservation for the MAC of the wireless adapter
- Restart the adapter (
sudo ifdown wlan0 && sudo ifup wlan0
) orpi sudo reboot
- Run
sudo raspi-config
and expand the filesystem