Skip to content

Instantly share code, notes, and snippets.

@simeg
Last active August 25, 2017 15:45
Show Gist options
  • Save simeg/a3cff9ee6a2a5c40f0fc79048e378948 to your computer and use it in GitHub Desktop.
Save simeg/a3cff9ee6a2a5c40f0fc79048e378948 to your computer and use it in GitHub Desktop.
Headless Raspberry Pi Setup

Prerequisites

  1. Raspberry Pi
  2. SD card
  3. Electric and network cable to RPi

Setup

  1. Download a distro image

  2. Connect SD card to computer

  3. List all available disks

     diskutil list
    
  4. Unmount the SD card, but do not eject it

     diskutil unmountDisk /dev/disk[disk-number]
    
  5. Write image to SD card

     dd if=/path/to/image.img of=/dev/rdisk[disk-number] bs=1m
    

(Might have to use bs=1M instead)

  1. Wait for operation to finish, takes a few minutes
  2. Connect SD card to computer again
  3. Create a file called ssh in root folder of SD card (touch ssh)
  4. Done! Unless you want to configure your wireless network too, then begin by looking at this forum post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment