There are several operating systems that can be installed on the Raspberry PI. The following details how to install the Raspberry Pi Foundations own OS, Raspberry Pi OS.
OR. You can download Raspberry Pi Imager from the Raspberry Pi website and do it all automatically. But where is the fun in that.
There are 3 versions available:
1: Raspberry Pi OS with desktop and recommended software
2: Raspberry Pi OS with desktop
3: Raspberry Pi OS Lite
This is how to install No: 1 (Though it holds pretty much true for the other 2 versions)
Download the OS from the official Raspberry Pi website and make a note of the integrity hash. Unzip the downloaded file to a directory. (I usually leave it in the Downloads directory)
You can check the integrity hash by running a checksum utility against the downloaded file to see if the sha256 sum is the same as that from the website. I use a Linux machine to do the following:
In a terminal go to the directory location that you have saved the downloaded file too. For example the Downloads directory.
Run the following command from the command prompt within the Downloads directory
sha256sum OSMC_TGT_rbp2_20190424.img
The result will appear a few seconds later. If the resulting alpha/numerical sequence matches the one from the Raspberry Pi website the file should be safe to use.
To install the .img file to a micro sd card open a terminal at the directory containing the image file.
Type at command line:
sudo dd bs=1M if=OSMC_TGT_rbp2_20190424.img of=/dev/sda
(To view the progress of an operation, add to the end: status=progress)
Once that has completed after a couple of minutes, put the micro sd card in the Raspberry Pi and connect up to a monitor, power supply and keyboard. Switch on and let it go through the setup process.
The first thing to do is change the default password on the Raspberry Pi. Go to
Make a note of the new password as you will need it when you run some of the following commands.
You can now connect the Raspberry Pi to the internet via wireless or cat5 cable.
Open a command prompt by
and type:
sudo apt update
sudo apt install ufw
sudo ufw enable
Restart the Pi.
This will install a basic firewall for when you go online.
You can check it is enabled by typing from the command prompt:
sudo ufw status
At the command prompt type:
sudo apt update
sudo apt upgrade
Then type: Y
This should install all the software updates available.
You should now have a fully installed and updated Pi.
It is usually wise at this point to make a full back up of your working install. There is software on the Pi that lets you do this. Simply go to
You can play around with the various settings to change the look of your system i.e. change the background, font size, location of the taskbar etc.