
How to flash a Raspberry Pi and update it?
Introduction
Flashing a Raspberry Pi is the first step to unlocking its full potential. This operation involves installing an operating system (OS) on an SD card, so that your Raspberry Pi can start up properly.
In this guide, you will learn :
- How to download and install Raspberry Pi OS
- How to flash your SD card with Raspberry Pi Imager
- How to update your Raspberry Pi after installation
- Best practices for securing and optimizing your system
Why flash a Raspberry Pi?
The Raspberry Pi is sold without an operating system. Flashing an SD card means installing an OS for :
- Launch the device in a working environment
- Configure network settings (Wi-Fi, SSH) before first startup
- Optimizing performance and safety
- Install services such as Pi-hole, Home Assistant or RetroPi
Before you start
Before flashing your Raspberry Pi, make sure you have :
- A Raspberry Pi (models 4, 5 or Zero recommended for 2025)
- microSD card (minimum 32 GB, class 10 or A1/A2)
- An SD card reader for your PC
- A computer (Windows, macOS or Linux)
- Internet connection
- The official Raspberry Pi Imager tool
Tip: For optimum performance, use a fast SD card or SSD connected via USB 3.0.
Step 1 - Download Raspberry Pi Imager
- Visit the official website:
https://www.raspberrypi.com/software/ - Download the appropriate version for your operating system (Windows, macOS, Linux).
- Install and launch the Raspberry Pi Imager tool.
Step 2 - Choosing and configuring the OS
- Click on Choose OS
- Select Raspberry Pi OS (64-bit)recommended for most projects
- For server use, choose Raspberry Pi OS Lite (without graphical user interface)
Step 3 - Prepare SD card and activate advanced options
- Click on Choose Storage and select your SD card.
- Open the advanced settings (⚙️ icon) to :
- Configure Wi-Fi (SSID + password)
- Enable SSH for remote access
- Set host name and secure password
- Click on Write to start flashing.
- Once finished, eject the SD card and insert it into your Raspberry Pi.
Step 4 - Starting the Raspberry Pi for the first time
- Plug in your Raspberry Pi (power and HDMI if you're using a display).
- Wait for initial configuration.
- Please log in:
- Via screen and keyboard: default identifier
pi
and the set password. - Via SSH :
- Via screen and keyboard: default identifier
ssh pi@ip_address
Step 5 - Update Raspberry Pi OS
To keep your system up to date, open a terminal and run :
sudo apt update && sudo apt full-upgrade -y
Then restart :
sudo reboot
Step 6 - Securing your installation
- Change the default password with the command :
passwd
- Install a simple firewall:
sudo apt install ufw -y
sudo ufw enable
- Configure SSH with a public key for greater security.
Step 7 - Optimizing performance
- Activate the boot on SSD for greater speed.
- Use Docker to manage your applications.
- Configure overclocking via
raspi-config
(only with suitable cooling).
easy projects after installation
- Install Pi-hole to block network advertising
- Create a media center with Kodi
- Set up Home Assistant for home automation
- Turn your Pi into retro console with RetroPie
- Deploy a personal cloud with Nextcloud
Conclusion
You now know how to flash a Raspberry Pi, install Raspberry Pi OS and keep it safely up to date. This step is essential to launch your first projects and make the most of your Raspberry Pi's full potential.