Advertisements

Set of configurations to perform on the first run of your Raspbian Stretch Lite

After you had setup Raspbian Stretch Lite with SSH server enabled on your microSD card or setup Raspbian Stretch Lite with remote configuration over WiFi on first boot, there are a couple of configurations that you should perform for your Raspbian Stretch Lite.

This post walks through some of the configurations that you may want to perform on the first run of your Raspbian Stretch Lite.

Finding the IP address of the Raspberry Pi 3

When Raspbian Stretch Lite boots up, it will request an IP address from your router. This IP address is needed for you to SSH into the Raspberry Pi 3. Go to your router's address allocation table and find an entry with the name raspberrypi.

Getting into the Raspbian Stretch Lite operating system via SSH

Let's suppose that the router allocated 192.168.1.109 to your Raspbian Stretch Lite.

In addition, the default credentials to log into Raspberry Pi Stretch Lite is as follows:
Username: pi
Password: raspberry

With the default credentials and the IP address that the router had given to Raspbian Stretch Lite, run the following command to SSH into the Raspbian Stretch Lite operating system:

ssh pi@192.168.1.109

Enter raspberry when Raspbian Stretch Lite prompts for password. This will result in Raspbian Stretch Lite greeting you with output similar to the following:

Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

Changing the default password

Since Raspbian Stretch Lite suggests that using the default password for the 'pi' user is a security risk, the next thing that you should do is to change the default password. To do so, enter the following command:

passwd

For the three prompts that follow the command, enter raspberry and your favourite password twice.

Configuring the locale settings

The next thing that you will want to do is to configure the locale settings for your Raspbian Stretch Lite. To do so, open up the Raspberry Pi Software Configuration Tool:

sudo raspi-config

Once the Raspberry Pi Software Configuration tool had started, follow through the following screens to generate the "en_US.UTF-8" locale and set it as the default locale for the system environment:

raspi-config Raspbian Stretch Lite 20171129 with Localisation Options selected

raspi-config Raspbian Stretch Lite 20171129 with localisation options change locale selected

raspi-config Raspbian Stretch Lite screen for generating en-us utf-8 locale

raspi-config Raspbian Stretch Lite setting en-us utf-8 as default locale for system environment

After doing so, open up /etc/default/locale with nano:

sudo nano /etc/default/locale

And update the contents to look like the following:

LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
LANGUAGE=en_US.UTF-8

This will ensure that the locale settings for Raspbian Stretch Lite persist through system reboots.

Changing Timezone

The default timezone of Raspbian Stretch Lite is "Etc/UTC". However, if your Raspberry Pi 3 is not residing in that Timezone, you may want to change it.

For example, to change the Timezone on Raspbian Stretch Lite to Singapore's Timezone, you can use the Raspberry Pi Software Configuration Tool mentioned earlier and go through the following steps:

raspi-config Raspbian Stretch Lite 20171129 with Localisation Options selected

raspi-config Raspbian Stretch Lite 20171129 with Change Timezone selected

raspi-config Raspbian Stretch Lite 20171129 with Asia selected

raspi-config Raspbian Stretch Lite 20171129 with Singapore selected

Once you had configured the Timezone, restart Raspbian Stretch Lite with the following command:

sudo shutdown -r now

Get back into Raspbian Stretch Lite with the following command once it had restarted successfully:

ssh pi@192.168.1.109

Next steps

If you had arrived to this page without an idea on what to do with your Raspberry Pi, you may want to look at some of the projects that you can build on top of a Raspbian Stretch Lite operating system.

Advertisements

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.

Techcoil Recommends

Udemy.com Homepage 300x250
Advertisements
Advertisements