Initial Raspberry Pi Setup

Raspberry Pi 2 Model B v1.1 top new (bg cut out)

There are already lots of guides covering various aspects around setting up your Raspberry Pi, including this useful guide:

As I as I don’t tend to do it all that often, I’m capturing this more for my own benefit, but of course this may be useful for others. The website produce a NOOBs image which enables you to install Raspian, or several other distributions. If you are just starting out, then that image maybe something you want to consider. Alternatively if you know you just want Raspbian, then just download that image as it is going to be quicker.

First things first: SD Card

Not all SD cards are equal, check out: for details. Also be very aware of cheap SD cards being offered for sale. A friend of mine purchased several 8GB cards which turned out to be fakes. Only actually storing 512MB of data. So if you are having issues, try writing and reading back a multi-gigabyte file and see if it works.

Preparing your SD Card

Download SD Formatter: then follow these simple steps:

  • Install SD Formatter
  • Run SD Formatter
  • Ensure the drive letter selected is that of your SD Card
  • Format the SD Card after selecting Option: Format Size Adjustment: ON


Getting NOOBS or Raspbian images on to your SD card

If you’re using the NOOBS image, you just download and extract the zip and copy the files to your freshly formatted SD Card. See more info here:

If you’re using Raspbian, you’ll download a zip. Once you extract it you’ll be left with an IMG file. Download and install Win32DiskImager. Run Win32DiskImager as administrator, then follow these steps:

  • Select the Raspbian Images file you previously extracted
  • Select the drive letter of your formatted SD card
  • Select Write
  • Once writing is complete. Close Win32 Disk Imager and using Explorer “eject” the SD card before physically removing the card from your card reader.


First time boot

For the initial configuration of your Raspberry Pi, you really need to have a USB keyboard and HDMI video connected. I’m sure there are ways and means to avoid this step, but for now, let’s keep it simple.

If you’re using the NOOBs image your first time boot with be to select the distribution/software you want to install on the card. Once you’ve done that the process that follows is the same.

When booting Raspbian for the first time you’ll be presented with the menu screen of the Raspberry Pi Software Configuration tool (raspi-config).


For the most part, unless you know you want to enable I2C, SPI, overclocking etc, you may just want to select Finish. However there are a couple of options I feel you may want to consider:

  • “1 Expand Filesystem” which allows you to use the entire capacity of your SD card for the OS.
  • “2 Change User Password” to something secret to you, rather than the default password: raspberry (BTW the default username is: pi)

I’m not all that keen on the idea of running a GUI based distribution on my Raspberry Pi as my plans typically are around making them headless. However option 3 controls what environment your Pi will boot into.

If you need to come back and change any options, once logged in run: sudo raspi-config


So once you’ve completed the initial configuration your Raspberry Pi will reboot and it should boot to a logon prompt. Logon and have fun. If you want to start using your Raspberry Pi headless (without a local keyboard and video output), then the first step will be to determine its IP address and use an SSH client to connect in.

Basic file editing can be performed with the built in editors:

  • vi
  • nano

Or you can download your favorite editor, or better still follow my guide on how to setup remote file editing.

Network Setup

If you are using a wired network connection to your Raspberry Pi and have DHCP running on your network, obtaining the IP address is very easy. If you’re lucky when your Pi boots it will have obtained it’s IP address and will display it on screen before the logon message. If not, then logon and run either: hostname -I  or ifconfig. Examples below, with the IP address highlighted in the output in yellow:

hostname -I

[email protected] ~ $ hostname -I


[email protected] ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:c1:d9:ea
inet addr: Bcast: Mask:
RX packets:42187 errors:0 dropped:1 overruns:0 frame:0
TX packets:2569 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2445952 (2.3 MiB) TX bytes:177420 (173.2 KiB)

lo Link encap:Local Loopback
inet addr: Mask:
RX packets:72 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6288 (6.1 KiB) TX bytes:6288 (6.1 KiB)

wlan0 Link encap:Ethernet HWaddr 80:1f:02:d3:33:ca
RX packets:0 errors:0 dropped:15 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Playing a game of hunt the IP address shouldn’t necessary very often as DHCP leases often last for days so your Pi is likely to keep the same address. To ensure you can find your Pi on the network without needing to scan the IP range to find it, I’d recommend one of two options.

  • Option 1: Configure a DHCP reservation for the MAC address of your Pi. Routers vary what they call this, by Draytek router for example offers this capability under “Bind IP to MAC” in it’s UI.
  • Option 2: Configure your Pi to use a static IP address on your network. This should be outside the DHCP range of addresses, but still within your network as defined by the subnet mask. More information on configuring your Pi to use a static IP address can be found over here:

Basic WiFi Setup

If you are wanting to use Wireless networking, then I’d recommend the Edimax EW-7811UN, as this doesn’t need any special drivers to be used with the Raspbian image, it just works out of the box. Though’ll need to configure your wireless settings. For configuring this see this guide which will apply to most common deployments:

If your Wireless Networking environment is more complex, or actually more simple in some cases, you’ll need to dig a little deeper into the options for the wpa_suplicant.conf file. The following guides and manuals I’ve found most useful as a reference for accessing both open access points and Enterprise secured networks which required authentication:

Shutting Down Your Raspberry Pi Computer

Like any computer they really ought to be shutdown properly and not just have the power yanked from them.

  • On the site they issuing the command: sudo halt
    • Waiting for the Pi to signal it’s ready to turn off by flashing the signal light.
  • I prefer: sudo shutdown -h now
    • Since I’m shutting it down I’d like to have it turned off too.

Either method is fine and will result in ensuring all the services are cleanly stopped and date writes committed to the storage before being powered down.

Note: This guide was written based on experience with Raspbian Wheezy, 2015-05-05, Kernel: 3.18 from and tested on a Raspberry Pi 2, though this should apply to other distributions and models of Pi. The USB WiFi adapter used is Edimax EW-7811UN 150Mbps Wireless Nano USB Adapter, I purchased mine via Amazon.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.