How to setup your Raspberry Pi

Download Raspbian

Visit www.RaspberryPi.org to download the latest version of Raspbian. The download will be a ZIP file. Extract this to get the IMG file inside.

This page was last checked to be in working order using the 2015-09-24-raspbian-jessie.img download.

Flash your SD card

Windows

If you're using Windows, download and install a copy of Win32DiskImager. Point it to the .img file you just downloaded, select the correct drive letter, and click Write. When it's done, use the devices icon in the tray to Safely Remove the Device.

Win32DiskImager

Linux

If you're using Linux, determine your card writer's device name: ls /dev/sd* Make sure no partitions were auto-mounted (use umount to unmount them): mount Copy the image file to the device (replace IMAGEFILE and DEVICE with the appropriate paths): date; dd bs=4M if=IMAGEFILE of=/dev/DEVICE; date

Mac OS-X

See https://www.raspberrypi.org/documentation/installation/installing-images/mac.md

Plug everything in

Configuration in raspi-config

From a terminal, run

sudo raspi-config
sudo raspi-config

At this point, reboot the Pi before you do anything else! This way, the locale gets fully applied:

sudo reboot
sudo reboot

When it has booted up again, run raspi-config again.

If raspi-config doesn't ask to reboot, do it manually:

sudo reboot
sudo reboot

Generate new SSH keys

At this point, you have an SSH server running by default on port 22. But it is using the public/private key pair from the Raspbian image. This means that you have the same key pair as every other Raspberry Pi in the world. This, in theory, is a security vulnerability. To clear out those keys and generate a new random key pair, run these commands at the terminal:

sudo shred --remove /etc/ssh/ssh_host_*
sudo dpkg-reconfigure openssh-server