HowTo: Raspberry Pi – Initial Setup

Initial Setup

If you have just gotten your Pi, now you need to get started. Your Pi is nothing more than a base computer. Before it can do anything, you must first load an operating system. In the case of the Pi, the operating system should normally be loaded on an SD card, which is inserted directly into the Pi.

Lucky for you, getting started is easy, and involves only a few steps. Take a look at the introductory video. Full instructions are below:

IMAGE ALT TEXT

Setting up your new Pi

Setting up the Pi for the first time requires the following steps:

  1. Download an operating system from the web
  2. Load the operating system onto an SD card
  3. Boot your Pi from the SD card
  4. Perform the initial Setup

Downloading an Operating System for the Pi

You can download the operating system for your new pi from https://www.raspberrypi.org/downloads/ . I recommend using Raspbian if you are just starting out because it provides many of the most useful functions and is a good place to start learning.

Download Raspbian from the raspberrypi.org website.

You will download a .zip file. Once the download has completed, you will need to extract the image file from the ZIP archive. If you are using windows, you should navigate to your downloads folder, select your downloaded zip file, right click, and select “Extract All”. Once complete, you should see a file ending in .img

Load your new OS onto the SD card

How you get the operating system onto your new SD card will depend on the operating system you are using for your base machine.

Windows

If you are using windows on your main computer, first download Win32DiskImager from http://sourceforge.net/projects/win32diskimager/ install it, and launch it.

win32diskimager

Select the image file that you extracted in the first step of this process.

Be careful to select your SD card under device. All data on the selected drive will be erased during this process. In my case, my new SD card was identified as e:. You should exercise extreme caution if you have multiple removable media inserted into your computer, for instance if you have more than one SD card, or a USB jump drive inserted while attempting this process. Selecting the wrong device could result in the loss of data.

Linux

If you are using Linux, insert your SD card into a card reader on your desktop and execute the following command as root (or sudo):

fdisk -l

You should see an entry showing your SD card. An easy way to identify your card is by the size of the partition. Typically the SD card will be sized between 4GB and 32GB. Hard drives are typically significantly larger. In my case, the SD card was identified as /dev/sde. It contained two partitions, /dev/sde1 and /dev/sde2.

Assuming that your sd card is identified as /dev/sde and your image file is 2015-11-21-raspbian-jessie.img, you can write the image using the following command (as root):

dd if=./2015-11-21-raspbian-jessie.img of=/dev/sde

More information on the dd command is available at: http://www.barryhubbard.com/linux/dd-how-to-copy-a-drive-in-linux-from-the-command-line/

Boot your Pi from the SD card

Before booting your pi, you will first need to install your SD card into the Pi. The SD card will fit into the slot on the bottom of the Pi.

SD card in Raspberry Pi
]2 SD card in Raspberry Pi

Once you have put the SD card into the Pi, you will need to connect a monitor. The easiest way is to use the HDMI port. If you would like to use the A/V connector, keep in mind that the wiring for the TRRS (Tip Ring Ring Sleeve) connector is somewhat non-standard, and shown below:

Raspberry Pi A/V connector
]3 Raspberry Pi A/V connector

You will also need to plug a power adapter into the Micro USB plug. This should be able to provide at least 1.5 – 2 Amps at 5V. The power port is shown below.

Raspberry Pi Power Port
]4 Raspberry Pi Power Port

Once you have plugged in your Raspberry Pi, it should boot automatically. When the boot is complete, you should be taken to the desktop.

Perform your Initial Setup

raspbian_desktop

From here, click on the Terminal icon at the top of the screen to launch the terminal.

Raspbian - Terminal Icon
]6 Raspbian – Terminal Icon

To run the initial config, you should type:

$ sudo raspi-config

Which will bring up the following screen:

2015-12-22-190606_656x416_scrot

At the very least, you should run the top two commands: Expand Filesystem and Change User Password.

Expand Filesystem – will make the entire size of your SD card available for your Raspbian installation.

Change User Password – Will change the default password for the Pi user. You can always change your password by opening a terminal window and executing the following command:

$ passwd

When you are finished, you can press your button to exit the menu selection, and press finish.

You should reboot your Pi to make the complete the changes.

Finding your IP Address

It is always helpful to know your IP address. To find your IP address, open the terminal as shown above, then execute the following command:

$ ifconfig

Your result should be similar to what is shown below. In the picture, the IP address of the machine is shown.

ifconfig

Where to go from here?

Once you have finished your initial setup, a good next step is installing a power button, following the instructions at: http://www.barryhubbard.com/raspberry-pi/howto-raspberry-pi-raspbian-power-on-off-gpio-button/

Leave a Reply

Your email address will not be published. Required fields are marked *