Learn how to install an OS on a Raspberry Pi, as well as how to clone your setup for quick disaster recovery.
Your Raspberry Pi doesn't come with an OS pre-installed.
You may choose from a wide selection of operating systems (OSs), so this is not a disadvantage. Any of these may be flashed to the SD card of your Raspberry Pi. Using Windows, macOS, or Linux, here's how to install and get a new OS up and running on your Raspberry Pi.
Use the Right SD Card
You need to make sure you have the right operating media before you even think about downloading an OS on a Raspberry Pi. Except for the first generation, which used ordinary SD cards, Raspberry Pis boot from microSD cards. You'll need to make sure you have a microSD card with the right amount of storage space for the operating system.
A 16GB microSD card should be the minimum size you consider, given the size of most operating systems. A 32GB SD card, on the other hand, may be virtually as cheap when you're looking to buy one.
Choosing Your Raspberry Pi Operating System
Several operating systems may be installed on your Raspberry Pi. These include the recommended Raspberry Pi OS (and its Lite variant), Ubuntu, as well as operating systems for Kodi, RetroPie, and a variety of other projects. Our list of Raspberry Pi operating systems will give you an idea of what's available—the options are vast.
Disk images in ISO or IMG format are available for Raspberry Pi operating systems. It is simple to write the file. The SD card may be used to write the Raspberry Pi operating system using a variety of tools. The top choices are:
- Raspberry Pi Imager
- Command Line (Linux and macOS)
Below we'll look at these three methods in turn.
Install an OS With Raspberry Pi Imager
Raspberry Pi Imager, which is available on the Raspberry Pi website, is software that writes an operating system to your Pi's SD card. The app includes a list of operating systems, including Raspberry Pi OS and other desktops, media players, and emulation and gaming OSs.
Download: Raspberry Pi Imager
Ubuntu, macOS, and Windows all support Raspberry Pi Imager. The process is straightforward when your machine has been installed:
- Under “Operating System” click “Choose OS“.
- Browse the list for your preferred OSs and select the one you want.
- Click “Ctrl+Shift+X” to preconfigure advanced options (see below)
- Next, click “Choose Storage” to select the SD card
- Click “Write“.
Wait for the data to be written down and confirmed. When you're finished, click “Continue“, and then close the imager tool.
Advanced Options in Raspberry Pi OS
Some practical, time-saving advanced functions are offered by the Raspberry Pi Imager. After the Pi has been booted for the first time, it may be preconfigured to save you time and keep you from messing about.
For example, you may set the device's hostname and activate SSH with user credentials. Wi-Fi may also be established in advance using information downloaded from your PC running the Raspberry Pi Imager.
By using the dropdown at the top of the Advanced Options box, these options may be set for the first session or used permanently.
Use Etcher to Flash an Operating System to Your Raspberry Pi
You will need to download the chosen operating system image to your PC before using Etcher. You are no longer restricted to a predetermined list and may install any suitable OS. (While using a downloaded image file is permitted by the Raspberry Pi Imager, it is not the default choice.)
Download Etcher once you've downloaded your selected disk image. This is a tool for writing disk images from your computer to flash storage, such as an SD card or USB thumb drive. It's a simple mouse-driven app that's available for Windows, Linux, and macOS.
Download: Etcher (Free)
You'll notice three buttons after Etcher is installed and running: Select Image, Select Drive, and Flash. To use Etcher to flash an image:
- Click “Select Image“.
- Browse to the downloaded ISO or IMG file.
- Next, click “Select Drive“.
- Confirm the correct SD card is selected.
- Finally, click “Flash” to begin writing the data.
Click “OK” to complete the process and close Etcher after waiting while the data is written to the SD card and confirmed. After removing the SD card, put it into your Raspberry Pi that is not switched on. As the computer boots the operating system, attach the power cable and wait.
Install an Operating System Using the Linux Terminal
This is straightforward under Linux if you choose to set up your Raspberry Pi's SD card via the command line. Before proceeding, make sure you have obtained the appropriate ISO disc image of the operating system you want to use.
Using the dd command, which should be used with caution, is one way that it is used. Before proceeding, double-check that you've input the command properly, since DD may be devastating if used incorrectly.
Start by inserting the SD card in the reader, then search for it in the “/dev” directory with
sudo ls -ltr /dev/*
As mmcblk0, you should be able to spot the SD card. Avoid references to the card's partitions (mmcblk0p1, mmcblk0p2, etc.), which you should disregard. For this procedure, the entire disc (mmcblk0) is used.
When you're ready, enter the command:
sudo dd bs=1M if=/path/to/raspberrypi/image of=/dev/sdcardname status=progress conv=fsync
The file path to the ISO file is specified in the if= section of the command, and the destination is specified in the of= section. Make sure to modify the above command to reflect your system.
The command will run when you press “Enter“. Take advantage of the opportunity to enjoy a hot drink while the process completes, since it is not a quick one.
Other Tools for Installing Raspberry Pi Operating Systems
For installing an OS on your Raspberry Pi's SD card, additional, slightly more complicated tools are available.
New Out of Box Software Installation System is the name of this Raspberry Pi Imager's precursor. It includes several operating systems, including RISC OS, Raspberry Pi OS, OpenELEC, Kodi, and others.
Use the downloaded file to unzip NOOBS, then transfer the contents to a microSD card installed on your computer. The SD card should now be inserted into your Raspberry Pi, powered up, and ejected.
To access the menu to install an OS with NOOBS, you will need a keyboard and/or mouse, an HDMI display, and an internet connection. After that, you may select and install an operating system.
Purchase an SD card with NOOBS already installed if using Etcher or Raspberry Pi Imager seems difficult.
Berryboot, an alternative to NOOBS, is better suited for installing various operating systems on a single microSD card. Berryboot, which is capable of installing your chosen operating systems on an SD card, a USB drive, or even networked storage, is great if you have a limited supply of microSD cards.
PINN Lite, an improved version of NOOBS, is another single or multiboot installation tool. To simplify the setup, the developer has supplied a web-based configuration tool.
To specify your media (SD card, USB, or both), capacity, and the Raspberry Pi you're using, just go to the website and use the web tool. Following the steps to download PINN and the configuration file, you may next select the operating systems you wish to use.
Booting Your Raspberry Pi OS for the First Time
With Raspberry Pi OS installed, you will need the following login credentials:
To find the default login credentials for other operating systems, check the documentation.
Remember that the password will not be shown as you type it; there are no * symbols representing the letters as in Windows. Instead, you will seem to have failed to input a password. This is a Linux security feature that prevents others from guessing the length of your password. Regardless, type the password.
Change your password when the Raspberry Pi OS starts up. In the Change Password window, you should be prompted to do so.
Alternatively, open Menu > Preferences > Raspberry Pi Configuration, and in the System Tab, click Change Password.
You may also change the password using the passwd command from the command line.
Installing an OS on a Raspberry Pi Is Easy
There are several options for installing one or more OS on Raspberry Pi. You can install single operating systems using the Raspberry Pi Imager, Etcher, or a simple command line instruction, or you can dual boot using tools such as NOOBS, Berryboot, and PINN.
You're set with all the tools at your disposal. What are you going to use your Raspberry Pi for? is the only question going on now?