- Download date-raspbian-stretch-lite.img https://www.raspberrypi.org/downloads/raspbian/
- Extract the zip, double click the .img to mount
- Open terminal, run
cd /Volumes/boot
- Run
touch ssh
- Run
cat << EOF > wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<NL>
network={
scan_ssid=1
ssid="<NETWORK NAME>"
psk="<NETWROK PASSWORD>"
}
EOF
-
Find a free ip address on your network
-
Unmount boot
-
Plug in your sd card
-
Use
diskutil list
to find the disk number -
sudo dd if=/path/to/date-raspbian-stretch-lite.img of=/dev/disk2 bs=1m conv=sync
(replace /dev/disk2 with the right one fromdiskutil list
) -
Wait (~10 minutes) until the process finished (use Ctrl-T to see progress)
-
Unmount boot
-
Plug sd card into raspberry (make sure the power is off)
-
Turn on raspberry and wait for it to come online
-
Find its IP (eg. By pinging the broadcast address
ping 192.168.1.255
then usearp -a
to see potential devices) -
ssh pi@<ip.address.of.raspberry>
(password is 'raspberry') -
sudo adduser <yourusername>
-
sudo usermod -a -G adm,dialout,cdrom,sudo,audio,video,plugdev,games,users,input,netdev,gpio,i2c,spi <yourusername>
-
logout (Ctrl-D)
-
ssh <yourusername>@<ip.address.of.raspberry>
-
sudo userdel pi
-
[ -f ~/.ssh/id_rsa.pub ] && ssh-keygen -t dsa -f ~/.ssh/id_rsa.pub
-
cat ~/.ssh/id_rsa.pub | ssh <yourusername>@<ip.address.of.raspberry> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
-
sudo apt-get update
-
sudo apt-get dist-upgrade