5 Things To Help Set Up Your Raspberry Pi

Look Out!

Just a heads up, this isn’t an EXHAUSTIVE list or even the TOP things to do. This is merely a list of operations I do personally. These are mostly set in the Raspbian’s tool “raspi-config” with the exception of just one line item set in the Raspbian OS specificially.

1) Expand Filesystem

When you install the Raspbian OS directly from the image file, the available filesystem size matches up with whomever created the image file to begin with. That means if they had their partition set at 8 gigabytes then your newly created Raspbian OS will have 8 gigabytes available (Even though you’re using a 32 gigabyte SD card).

To expand the filesystem you’ll need to use the “raspi-config” tool:

sudo raspi-config

Which will bring up this screen:

Screenshot of raspi-config

Option #1 is “Expand Filesystem”. Which is what you need. Hit enter to let the tool do it’s magic. After a brief flash in the terminal screen you should be presented with this screen:

Screenshot of root partition

Hit enter on “OK”. And when you reboot you’ll have the full SD card at your disposal.

2) Overclock

Now this isn’t a must by any means, but I like to do it since a lot of operations I perform on the Raspberry Pi are usually bound by the power of the CPU. So it’s nice to have that extra power under the Raspberry Pi’s hood.

To overclock you’ll need to run the raspi-config command:

sudo raspi-config

Which will bring up this screen:

Screenshot of raspi-config

Option #7 is “Overclock”. There’s a brief warning about the dangers of overclocking Now there are many articles about overclocking the Raspberry Pi. The consensus in the Raspberry Pi community is that it’s a good thing. And to futher reduce your fears, the makers of the Raspberry Pi have conducted extensive research and concluded there’s no measurable impact on the lifetime of the Raspberry Pi (source).

Hit “OK” and now you should be presented with a list of overclock presets:

Screenshot of overclock presets

Personally I’ve ran on the highest settings (Turbo) without any hiccups. The amount of overclock is just a matter of preference. Arrow down and hit “OK”. Then reboot your Raspberry Pi to experience the overclock.

3) Set Hostname

The problem this solves is “Which Raspberry Pi am I working on right now?”. Setting a hostname personalizes your Raspberry Pi so you can easily identify it once you SSH into it.

To set your Raspberry Pi’s hostname you’ll once again run the raspi-config command:

sudo raspi-config

Setting the hostname is tucked under #8 “Advanced Options”. After hitting enter you’ll be at this screen:

Screenshot of Advance Options

You’ll have to arrow down and choose option A2 “Hostname”. You’ll be presented with a disclaimer stating which characters are allowed in a hostname. Hit “OK”. And you’ll be presented with this screen:

Screenshot of Hostname

You’ll notice that the default is “raspberrypi”. Imagine having to SSH into multiple Raspberry Pis with all the same name of “raspberrypi”. Gets a bit confusing huh? Choose a name that best fits your Raspberry Pi’s personality. I named mine “bitpi”. Then hit “OK” and once again reboot your Raspberry Pi for the change to take into effect.

Once you’re presented with a terminal screen you’ll now see:

Screenshot of Hostname Part Two

4) Internationalisation Options

This whole section in the “raspi-config” is important to me. It sets the locale, sets my timezone and even controls my keyboard layout.

By default the Raspbian OS has “en_GB.UTF-8” locale enabled by default. Which is rightfully so since the Raspberry Pi Foundation is located in the UK. But for any of us not living in the UK this presents a little hurdle for us.

Once again issue the raspi-config command:

sudo raspi-config

Arrow down to option #4 “Internationalisation Options”.

Screenshot of Internationalisation Options

Choose I1 “Change Locale”. The next screen will present a list scrollable locales that the Raspberry Pi can generate for you, if you scroll down far enough you’ll notice that “en_GB.UTF-8” is selected and already generated for you:

Screenshot of Locales

Add and remove the locales you’d like access to. Since I live in the United States I went ahead an selected “en_US.UTF-8”. The next screen will allow you to choose your default. I chose the option “en_US.UTF-8”:

Screenshot of Locales Default

After selecting your default and hitting “OK”, the Raspberry Pi will now generate your locales for you.

Next option is Timezone. Go back to “Internationalisation Options” and choose option I2 “Change Timezone”. Once you go to the next screen it should look like:

Screenshot of Timezone

I live in the Midwest with daylight savings time. So I chose the options “US” and “Central”. Hit “OK”.

Last but not least is changing your keyboard layout. Go back to “Internationalisation Options” and choose option I3 “Change Keyboard Layout”. Each keyboard set up is just a tiny bit different, so just follow the onscreen prompts. This should help map your keyboard layout so the right keys are registered.

5) Set Clock

One thing the Raspberry Pi doesn’t have is an onboard clock. This presents a problem as the time is controlled on the OS layer. This means that setting up the clock (and keeping it accurate) requires internet access to the NTP servers. Basically ths Raspberry Pi is reliant on the intenet to tell time.

To look at your current time issue the “date” command:


You should see output similar to:

Thu Apr 16 11:14:26 CDT 2015

(At the time of this writing that time/date was correct to the millisecond.)

By default, Raspbian OS has the NTP service enabled. The only thing you need to do is make sure you set the appropriate timezone and the rest is set for you everytime you start your Raspberry Pi that is connected to the internet.

Until next time

To reiterate this isn’t a “be all, end all” list of things to do. But it’s a nice start. What are some other steps you go through in order your Raspberry Pi is in perfect working condition for your next project?