This is a very short version of the official guide[1], for Raspberry Pi 2 (RPI2) without attached monitor and keyboard. It is need to be connected to the router though.
Prerequisites:
- Raspberry Pi model 2
- Micro SD card
- Wired connection to router
- DHCP enabled on the router
- Macbook with card reader
Start from downloading the latest Raspbian (Debian Linux for Raspberry Pi) from https://www.raspberrypi.org/downloads/raspbian/. The Lite version seems to be about right. Unzip the image.
Write it to SD card:
- Identify SD card disk device name by running
diskutil list
. It should look like/dev/diskN
whereN
is the disk id. - Unmount it by running
diskutil unmountDisk /dev/diskN
, whereN
is device id identified at 1. For example,diskutil unmountDisk /dev/disk2
. - Copy the data by running
sudo dd bs=1m if=image.img of=/dev/rdiskN
. This will take a while. PressCtrl+T
to check the progress. - Enable ssh by creating file "ssh" in boot partition of the mounted SD card:
touch /Volumes/boot/ssh
. - Eject the card
sudo diskutil eject /dev/rdisk2
.
Insert SD card into RPI, connect RPI to the router and power it. In a minute check the list of connected devices and their IP addresses.
Connect to RPI with default username pi
:
$ ssh pi@ipaddress
After asking to save host fingerprint, it should display password prompt. Use password raspberry
.
You are in. That's typical Debian linux. Do nice things.