There are already some good tutorials that explain to how do a fresh install of Raspbian. I wanted to include one to support my other articles but thought I would sprinkle in some additional pointers to help you along the way.
- Download Raspbian
- Download Etcher
- Installing Raspbian
- Access the Pi with SSH
- Access the Pi with remote desktop
- A Raspberry Pi
- A copy of the latest Raspbian disk image
- An SD card with a minimum size of 4GB
- A Pi screen, keyboard and mouse (optional)
- PuTTY (optional, Windows)
- RealVNC (optional)
There are several versions of Raspbian that you can choose to download. It really depends on what you would like to do with your Pi.
If you want your Pi install to be a fully functioning computer then you can either download Raspbian with or without the bundled software. Either version will provide the desktop environment, the latter omitting the additional bundled apps. An 8GB memory card is required for these installations.
There is also a slimmed down version called Raspbian Lite, which does not contain the graphical GUI. It can be installed on a smaller 4GB SD card. This is ideal if you wish to embed your Pi into some application that does not require a desktop, as it frees up resources otherwise used by the GUI. A great example is using it for a Home Assistant server.
- Download Raspbian Desktop with bundled software from Raspberrypi.org
- Download Raspbian Desktop from Raspberrypi.org
- Download Raspbian Lite from Raspberrypi.org
After you download and unzip the Rasbian image, you may notice that it is in some kind of alien .img format. Yep, it stumped me the first time too! This is a raw disk image format similar to .iso or .dmg and must be mounted like a disk in order to be accessed. In our case we do not need to view the contents, we simply need to transfer the data on to our SD card.
Thankfully there is a very easy way to ‘burn’ or ‘etch’ the image to our SD card.
There are several ways to do this and one way is to use Terminal. The benefit of this is no additional software is required, however it is operating system specific and really requires a separate tutorial for each.
Thankfully there is a very easy way to ‘burn’ or ‘etch’ the image to our SD card. There is a tool called BalenaEtcher and best of all, it is totally free! Firstly head over to their website and download a copy for your OS and follow the installation instructions.
Once installed you will be presented with a very simple and clean user interface. As you can see there are just three simple steps.
Firstly click ‘select image’ and navigate to and select your downloaded Rasbian image.
If you have not inserted your SD card, you are going to need to insert it and allow it to register. Next click ‘select target’ and ensure your SD card is selected, then click continue.
Now you should see your Raspbian image and SD card selected. If both are correct, click ‘flash’ and wait for the flashing and verification to complete. It may take a while so go make a cup of coffee. ☕️
Now your SD card is ready! Well, almost… if you wish to connect your Pi to a screen, keyboard and mouse then you are good to go and congratulations, you can now put your SD card in to your Pi and use your shiny new Raspbian desktop.
Access the Pi with SSH
If you do not want to hassle of connecting your Pi to a screen, keyboard and mouse and intend on using it via remote control, the first thing we will need to do is access it via Terminal to set up a few things.
In order to access your Pi in terminal, we need to use something called SSH. If you are using Mac or Linux, this can be done directly from the Terminal within the operating system without any additional software, so go ahead and open up the Terminal.
If you are using Windows, you will need to download and install an SSH client if you don’t already have one. A common choice is PuTTY and you can download it from the official website.
It is not possible to access the Pi with SSH using the default disk image that we just etched as the option is disable by default. However it is quite simple to enable this option without having to connect a screen, keyboard and mouse. We simply need to create a blank file in the root of the SD card named ‘ssh’ with no file extension.
Once you have created the file you can remove the SD card and put it into your Pi. Connect your Pi to your network using the Ethernet port and power it up.
Find the IP address
There are several ways to find the IP address of the Pi. I find the easiest way is to log in to my router and look at the list of connected devices. This will be a slightly different process for different router/ISP configurations so you will need to consult the manual for your equipment. Usually navigating to http://192.168.0.1 or http://192.168.1.1 in your browser will yield the router management settings.
Alternatively you can use a third party application like Fing.
I am using BT over here in England and currently I have their standard Home Hub offering. For the Home Hub the management page is http://192.168.1.254. Navigating to this page allows me to see devices on my network and here we can see the Pi connected to Ethernet port 3 and its IP address, 192.168.1.80.
SSH to the Pi
Firstly we will need to open the Terminal. Then simply enter the following command.
Of course you should replace the IP address with the IP address of your Pi.
Enter the default password ‘raspberry’ and be sure to change it once you have access.
In order to access the Pi we will use our SSH client, so go ahead and open PuTTY. Enter your Pi IP address and ensure ‘SSH’ is selected under connection type. The port should default to 22 but you can enter this if it is missing.
After you click ‘open,’ a command line window will open. You will be prompted to enter your login. The default username is ‘pi’ and the default password is ‘raspberry’ so be sure to change it when you get the chance.
Access the Pi with remote desktop
Now that we have access to the Pi Terminal remotely, we can enable VNC. This will allow you to display the Pi desktop on our computer and operate it remotely. This is of course only necessary if you wish to access the desktop, personally I find SSH access to the Terminal sufficient for mostly everything I do with my Pi.
Firstly, now we are logged in to the Pi through SSH, lets enable the VNC server. This can be done from the Pi config menu by typing the following command.
Next you need to select the option ‘Interfacing Options’ followed by ‘VNC’ before finally being asked to confirm.
In order to access the desktop on the Pi we will need some viewing software. If you don’t already have a VNC client program, you can download a free copy of the RealVNC viewer from their official website.
Once you have downloaded and installed RealVNC, go ahead and open it up. Create a new connection, enter the IP address for your Pi and give it a name if you wish, then click OK.
You will be prompted for your login details, which are the same as what you used to access SSH.
Congratulations! You can now enjoy your new Raspberry Pi installation through either SSH or Desktop!
Now you have your new Pi up and running, why not have a go at flashing Tasmota to an ESP device.
I hope you found this tutorial useful, why not go ahead and check out some of my other awesome Raspberry Pi tutorials!