Skip to content

Instantly share code, notes, and snippets.

@SFrost007
Last active June 26, 2017 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SFrost007/0a5c2a512d8ff25612d228360f0224df to your computer and use it in GitHub Desktop.
Save SFrost007/0a5c2a512d8ff25612d228360f0224df to your computer and use it in GitHub Desktop.
How-To: Setup a Headless Raspberry Pi

The below is tested with the June 2017 release of Raspbian Jessie, for setting up a Pi without any local peripherals connected.

Main steps

  1. Flash Raspbian image (see below)
  2. Create empty file named ssh in root of SD card
  3. Create wpa_supplicant.conf in root of SD card (see below)
  4. Eject and put SD card in Pi
  5. ssh pi@raspberrypi.local (or otherwise find IP address)
  6. sudo raspi-config
    1. Change pi user's password
    2. Change hostname
    3. Enable VNC access (Interfacing options -> VNC)
  7. Configure VNC Connect for Cloud access (see below)
  8. Reboot
  9. sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade

Flashing instructions (macOS)

  1. Open Disk Utility
  2. Select SD's partition, note "Device" name (disk#s#) <- First digit
  3. Eject partition (not disk) from Disk Utility
  4. sudo dd bs=1m if=path_of_your_image.img of=/dev/rdisk#

wpa_supplicant.conf syntax

network={
    ssid="NETWORK NAME"
    psk="PASSWORD"
}
network={
    ssid="NETWORK NAME 2"
    psk="PASSWORD 2"
}

Configuring VNC Connect for Cloud

  1. TODO

Raspbian Lite only:

Ensure package libxkbcommon0 is installed

Retropie (with Pixel) only:

Ensure package gksu is installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment