Setting Up a Clean Raspbian Installation

I recently reinstalled Raspbian on my Pi, something which I haven’t done for a while. What was my go-to guide by Kynan Hughes has gone offline since I last set up my Pi, so I thought I’d share the process I follow based on Kynan’s steps with a few small extras thrown in. The process is trivial and should take less than 30 minutes.

Getting started

If you haven’t already got a copy, download Noobs (offline and network install) and save the zip file.

Insert an SD card - needs to be bigger than 8GB.

Download and install the SD Formatter. Run the application (you’ll need to run as administrator if on Windows). Select the SD card’s drive letter, Quick Format from the formatting options, and click on Format.

Extract the Noobs zip file and copy the files across to the root of the SD card.

Insert the SD card into your Pi, connect a screen, keyboard, and power source. Don’t connect the Pi to a network just yet.

Installing Raspbian

The Pi will boot into Noobs which will give you a choice of operating systems to install. Raspbian should be selected by default - press i and the installer will do its thing. Installation on my Pi takes about 10 minutes. Press OK/enter when the installation has completed and the Pi will boot into the Raspbian desktop.

I find it easier to carry out the following steps on the terminal. Press Ctrl+Alt+T to open a new terminal window, or Ctrl+Alt+F1 to open a full screen terminal (Ctrl+Alt+F7 will return you to the desktop).

Change the password

Raspbian will set up a default username and password, and will be configured to log in as that user automatically. Changing both of these should be the first thing that you do after installation. For reference, the default username is pi and the default password is raspberry

Once Raspbian has been installed the first thing you should do is change the default user’s password. The default username is pi, and the default password is raspberry. Change the default user’s password using the passwd command:

passwd
Changing password for pi.
(current) UNIX password: *****
Enter new UNIX password: *****
Retype new UNIX password: *****
passwd: password updated successfully

For bonus points create a new user using adduser:

sudo adduser bob
Adding user 'bob'...
...
Enter new UNIX password: *****
Retype new UNIX password: *****

Update the software

Now we can connect the Pi to the network. Updating the software is as simple as sudo apt-get update && sudo apt-get upgrade. This will take a few minutes to complete. The upgrade process may warn about additional disk usage - type y if this happens.

Update the configuration

Now that the software is up to date we can configure the pi. The most common tasks can be carried out through the Raspberry Pi Configuration Tool. Start the configuration tool with sudo raspi-config. Update the settings as follows:

Scroll down to Finish (press the right arrow key twice). Reboot the Pi to make sure the settings take effect - sudo shutdown -r now.

Unless I have a need to use a GUI I prefer to work on the Pi over SSH. I’ve given my Pi a fixed IP address on my network so that I can access it easily. Us ifconfig to verify that the fixed IP has been assigned correctly.

Job Done

As far as basic setup goes, that’s it - you’re good to go.

I’m always open to improving this process, so by all means leave suggestions in the comments below.