Raspberry Pi Setup.

Published on January 29, 2024
#raspberrypi
Written by Victor Cobos

In my journey with the Raspberry Pi, I've found a setup process that works seamlessly for me every time. It's a method I've refined through trial and error, aiming for simplicity and efficiency. I've decided to document this process, hoping it can serve as a straightforward guide for anyone looking to get their Raspberry Pi up and running. Whether you're a beginner curious about diving into the world of microcomputing or an enthusiast looking for a tried-and-tested setup routine, I hope my approach helps you unlock the full potential of your Raspberry Pi with ease.

1. Install Operating System on SD Card

The most straight forward way to install any Operating System on your Raspberry Pi is through the official Raspberry Pi Imager. It comes with all the tools needed to prepare and flash an SD card with the Operating System you want to install.

2. Enable SSH access

To enabled SSH we need to add an additional empty file called ssh to the SD card's root directory after is has been flashed with the image.

touch ssh

3. Enable Wifi

To enable Wifi create a file in the root of boot called: wpa_supplicant.conf. Then paste the following into it:

country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="NETWORK-NAME"
    psk="NETWORK-PASSWORD"
}

4. Eject the micro SD card

5. Boot the Raspberry Pi

After booting up your device, you can connect to it via SSH by using its IP address.

ssh pi@[Raspberry Pi IP address]

The default username is pi and the standard password is raspberry.

It's highly recommended to change the password on the first connection. You can do this and configure many other useful things in the handy Raspberry Pi Config tool:

sudo raspi-config

6. Update and Upgrade

Start by updating and upgrading the system. This ensures you install the latest version of the software.
Open a terminal window and run the command:

sudo apt-get update && sudo apt-get upgrade

7. Assign the .local Domain to Your Raspberry Pi

If you’re using your Raspberry Pi to host anything on your network, you might want to assign it a .local domain. With this, you’ll immediately be able to access your by a domain rather than remembering its IP address.

If you create a .local address for your Raspberry Pi you’ll be able to access your Pi using a simple web address.

To do this you need to install Avahi Daemon on your Raspberry Pi:

sudo apt-get install avahi-daemon

Once the installation process is complete, you don’t even have to reboot the device. Your Raspberry Pi will begin immediately recognizing local network queries for its hostname (by default raspberrypi) at raspberrypi.local.
You can change the hostname using Raspberry Pi Config tool: sudo raspi-config.

8. Install git

Sooner or later you will most likely end up needing git, so you can install it now:

sudo apt install git

Disclaimer

This may not be the best way to do it, but it is the way I use and it works for me 😊
This article will be updated as soon as something changes in this process.
If you do something different and you think it is better, do not hesitate to let me know.