After installing Raspbian, there are a couple of things to do to get better functionality out of the Raspberry Pi. The Raspi-config tool is the first place to start.
For a fresh operating system install, some hardware functionality needs to be activated (or can be deactivated) and the operating system itself needs to be configured. In many cases the default password needs to be changed and unused software packages might be excessive and can be removed.
To increase accessibility and to ensure uniformity, most steps are shown using terminal commands. For its first boot, its best to have the Raspberry Pi connected to a screen, keyboard and mouse. A connection to a local area network, in the form of an Ethernet cable, will make thing very easy, but a Wi-Fi connection can also be configured and used. After the initial setup, the Raspberry Pi terminal can also be accessed using PuTTY over a network.
The Raspberry Pi Software Configuration Tool (Raspi-config) is where most hardware and operating system settings are configured. Common configuration options include setting up the Wi-Fi network, expanding the filesystem, changing the user password, setting language and regional settings, activation of hardware ports and changing the audio settings (see later).
Raspbian Wheezy, Raspbian Jessie Lite and Raspbian Stretch Lite will boot straight into the terminal immediately asking for a username and password. The default username:password for Raspbian is pi:raspberry.
Raspbian Jessie and Raspbian Stretch will boot into the GUI. To access the terminal from Raspbian Jessie and Raspbian Stretch, click on the terminal button. Raspi-config can also be accessed from the menu.
On some distributions the very first boot might open Raspi-config automatically (e.g. Raspbian Wheezy). If this is not the case, Raspi-config can be accessed using the following terminal command:
To use Raspi-config from the terminal, the keyboard arrow buttons are used to move to the desired menu item and it is selected with the Enter key. The Escape key can also be used cancel certain options and to exit Raspi-config.
After completing most of the configuration settings Raspi-config will return to the main menu. The Raspi-config tool can be accessed at any time to update its settings.
Upgrading from a Raspberry Pi 2 with Raspbian Wheezy to a Raspberry Pi 3
When using a Raspberry Pi 3 (vs. Raspberry Pi 2 or earlier), Raspbian Wheezy will not boot out of the box. Raspbian Wheezy needs a distribution update while running on a Raspberry Pi 2:
sudo apt-get dist-upgrade
After this update has finished, the MicroSD card can be transferred to a Raspberry Pi 3. To use a Raspberry Pi 3 or higher, rather stick to the newest distribution of the operating system [e.g. Raspbian Jessie (Lite) or Raspbian Stretch (lite)].
Some settings are highly recommended, optional and while some are required.
Network configuration (recommended)
To be able to update Raspbian and Raspi-config, a connection to the internet is required. Connecting to a local network with SSH enabled (see later) will also give terminal access to the Raspberry Pi by using PuTTY.
When an Ethernet cable is used to connect to a network, a dynamic IP address will be automatically created. When Wi-Fi is used, the network name (SSID) and password (also called the passphrase or pre-shared key) will need to be supplied. As from Raspbian Stretch, this can be done using the Raspi-config tool. To use the GUI or terminal in stead, also see 3 ways to connect a Raspberry Pi to a network using Wi-Fi.
To change the Wi-Fi settings from Raspi-config, go to Network Options -> Wi-Fi. From the menu, select your country, enter the SSID and password.
The configuration settings for wireless connectivity is stored in the
Updating the Raspi-config tool (recommended)
If an internet connection is configured (see Network configuration above), the Raspi-config tool can be updated to the latest version. If available, this option is either under Advanced Options or, simply, under Update.
Expanding the Filesystem (recommended)
To ensure that all the SD card storage is available to Raspbain, the filesystem should be expanded. When writing a Raspbian image to a MicroSD card, a portion of the card will be unused. Choosing this option will expand the installation to fill the rest of the SD card, giving more space to use for files.
The Expand Filesystem menu item is either available on the main menu or under the Advanced Options menu.
Changing the user password (recommended)
The Change User Password menu item will allow the logged in user to change the login password. Changing the password, especially for the user ‘pi’, adds to the security of the Raspberry Pi. The next time the user is prompted for a username and password, this password will be accepted in stead.
Changing the default audio output hardware (optional)
The default audio output hardware will be set to auto, but can be forced to only use the 3.5 mm audio jack or the HDMI port. The audio output hardware settings, go to Advanced Options -> Audio.
The audio output hardware settings is stored in the
Correcting Overscan (optional)
This setting will allow compensation for a screens using overscan. When using a monitor or TV screen, overscan might, or might not create a fuller image. Try enabling or disabling this setting in Overscan under the Advanced Options menu.
Change the default language, location (time zone), keyboard settings & Wi-Fi country (recommended)
Choose Localisation Options (or Internationalisation Options for Raspbian Wheezy) and go through the menu items one by one.
Change Locale will set up language and regional settings and Change Timezone will set the clock offset (difference) from Coordinated Universal Time (UTC) determined by your country. More than one language can be selected, after which the default language will be asked. I usually choose
For the Change Keyboard Layout menu item I usually choose the
Generic 105-key (Intl) PC setting and then when prompted next under Keyboard Layout I choose
English (US). I don’t use keyboard functions so I just choose the default settings there.
The Change Wi-Fi Country option is only available from Raspbain Jessie.
After these settings has been configured, use the Back option to enter the main Raspi-config menu again.
Changing the hostname (recommended)
The hostname is used as the name of the Raspberry Pi and is used to identify it on a network. By default, each Raspberry Pi is named
raspberrypi. To avoid network clashes, each computer/Raspberry Pi on a network should have an unique hostname.
The hostname is not the username. The hostname can be changed in Advanced Options -> Hostname or Network Options -> Hostname. This will change the visible name of the Raspberry Pi on a network (e.g. from pi@raspberrypi ~$ to pi@yourhostnamehere ~$).
Enabling SSH (optional)
SSH (Secure Socket Shell) is a network protocol that provides a secure way to access a remote computer (in this case the Raspberry Pi) by using username/password authentication. On some Raspbian distributions, SSH is enabled by default.
When a ‘connection refused’ error is received when trying to connect with, for example, PuTTY and/or WinSCP, try enabling SSH first. SSH will pose a security risk if you’re not using it, in which case it is better to deactivate it. SSH can be enabled/disabled under Interfacing Options -> SSH or Advanced Options -> SSH.
Activating the camera module (optional)
To be able to use the Raspberry Pi camera module, the camera connection port needs to be activated. With the Raspi-config tool, the camera connection is either enabled under Interfacing Options -> Camera or Enable Camera.
After all the settings has been configured, the Raspi-config tool can be exited by selecting the Finish option. Even if the Rapi-config tool does not ask for it, it is always recommended to reboot the Raspberry Pi afterwards.
Doing system updates (recommended)
Before moving on from the first time setup, Raspbian should be updated. This can be done before or after rebooting (mentioned in the previous step). Running updates regularly on the Raspberry Pi ensures that all the software packages are up to date. This will ensure smoother operation, less security vulnerabilities and greater compatibility. To be able to update Raspbian packages, a connection to the internet is required. Raspbian is updated with the following two terminal commands.
sudo apt-get update sudo apt-get upgrade