Be Useful.

Installing RetroPie on a Raspberry Pi 5 using the command line

Cover Image for Installing RetroPie on a Raspberry Pi 5 using the command line

RetroPie used to ship a ready-to-flash image, but the Raspberry Pi 5 doesn't have one at the moment. Let's take the manual route.

Trippy Robot
(updated)

RetroPie was my first experience using a Raspberry Pi. A gateway drug to the wonderful world of single-board computers and open-source software, where a little machine could emulate a multitude of classic videogame systems like the NES and the Commodore 64.

So every time a new generation of Raspberry Pi comes along, I like to revisit it and kick the tires. Today we have the Pi 5, a gloriously overpowered beastie that's still the same dimensions as its predecessors.

Things have changed on the software side, though. There are far easier ways to get retro games on the telly. The likes of RecalBox, Batocera and Lakka are the cool kids. Flash any of those to an SD card and it boots into a polished menu with hundreds of systems already wired up, and they run smoothly on a Pi 5.

RetroPie used to be that easy too. It shipped ready-to-flash images for years. And then, right around the time the Pi 5 arrived, it stopped. If you come to RetroPie today on a current board expecting the flash-and-go experience it used to offer, you might be hitting a wall. This post is a guide to get you over it.

What's changed since the last time I wrote this up

The previous version of this guide came out of a prompt. I described what I wanted to an AI model, it produced a sequence of terminal steps, and I tested them on hardware before publishing.

That's the house formula: written by GenAI, tested by a human.

I've done the same thing again for this update, with two differences. The model is newer, and the ground has shifted since the initial write-up:

  • The base OS moved a whole Debian generation. Last time the foundation was Raspberry Pi OS based on Debian 12 “Bookworm.” As of October 2025 the default image is rebased on Debian 13 “Trixie,” running the Linux 6.12 LTS kernel.

  • The default account changed. Raspberry Pi OS no longer ships with a default pi user; you set your own during flashing. Every guide that still tells you to ssh pi@... is quietly broken from the first login. More on this below.

Before you start

Quick orientation, if you're new to either. The Raspberry Pi is a credit-card-sized single-board computer — a whole machine, CPU and ports and all, on one small board — made by the Raspberry Pi Foundation and aimed at the education market, but also the default canvas for hobbyist hardware projects.

RetroPie is software you can put on one: it turns the Pi into a dedicated retro-games console, bundling the emulators that mimic old systems (NES, Mega Drive, PlayStation and dozens more) behind a single couch-friendly menu you drive with a controller. You supply the board and the games; RetroPie is the bridge that makes the thing feel like a console rather than a computer.

For most of its life RetroPie offered pre-built images — you picked the one for your board, flashed it to media, done. Those images stopped at version 4.8 in 2022, covering hardware up to the Pi 4 and Pi 400. An image for the Pi 5 hasn't been produced yet. The project still works with this board; it just supports it through the setup script rather than a ready-made image.

So the route now is: install a plain Raspberry Pi OS, then build RetroPie on top of it.

Hardware

  • Raspberry Pi 5 (4GB is fine; 8GB if you want headroom)

  • Boot media — see the note below on microSD vs. NVMe

  • The official Pi 5 USB-C power supply (the 27W one — this board is fussy about underpowered supplies)

  • Micro-HDMI to HDMI cable for first setup

  • A USB keyboard for setup, and game controllers for after

  • Active cooling. The Pi 5 runs hot under load and emulation is load. The official active cooler or a case with a fan, not an afterthought.

  • A network connection, wired or wireless

A word on boot media

A microSD card is the path of least resistance — cheap, simple, universally documented.

But the Pi 5 can boot from an NVMe SSD over PCIe with the right HAT, and for an emulation box it's a genuine upgrade: faster boot, faster menu loading, and far more durable than a card being written to constantly.

I'll flag the two places in setup where the choice actually changes what you do. Everywhere else, the steps are identical.

Software

  • Raspberry Pi Imager, on your main computer, from raspberrypi.com/software

  • An SSH client. macOS and Linux have one built into the terminal; on Windows the built-in ssh command works fine, or use PuTTY if you prefer a window.

Step 1: Flash Raspberry Pi OS (Lite, 64-bit)

We want the Lite image, which is headless by design, no desktop GUI. RetroPie brings its own frontend (EmulationStation), so a graphical desktop underneath it is just wasted resources.

  1. Open Raspberry Pi Imager.

  2. Choose Device: Raspberry Pi 5.

  3. Choose OS: Raspberry Pi OS (other) → Raspberry Pi OS Lite (64-bit) — the current Trixie-based release.

  4. Choose Storage: select your microSD card or your NVMe drive. Check this twice. Imager erases whatever you point it at.

  5. Click the gear / Edit Settings before writing. This matters more than anything else on the screen:

    • Set hostname — something like retropie, so it's easy to find on your network.

    • Set username and password — and here's the change that breaks old guides. Raspberry Pi OS no longer ships a default pi user; you create your own account right here. Whatever you type as the username is what you'll log in as over SSH. If older instructions say ssh pi@..., that's why it fails — there is no pi unless you make one.

    • Enable SSH — under the Services tab. Password auth is fine to start; key-based is better if you know how.

    • Configure wireless — network name and password, unless you're on Ethernet.

    • Set locale — timezone and keyboard layout.

  6. Write. A few minutes to a card; usually quicker to NVMe.

I ran the full install on a Pi 5 on the current Trixie image and it went through cleanly. So Trixie is the path I'd point you at, not a gamble.

Just in case: the Bookworm fallback

RetroPie's setup script checks which OS it's running on, and historically it has refused to proceed on a Debian release it doesn't yet officially support.

I didn't hit that on Trixie, but if a future point-release ever does throw an “unsupported OS” message instead of the install menu (Step 4), the fix is to come back here and flash the Bookworm-based Raspberry Pi OS Lite (64-bit) instead.

In Imager, under Raspberry Pi OS (other), look for the Bookworm or “Legacy” Lite release. Nothing else in this guide changes; only the base image does.

Step 2: First boot and find the Pi on your network

Put the card or drive in the Pi, connect power, and give it a minute on first boot. It expands the filesystem and settles in.

You don't need the monitor and keyboard beyond this point; we'll do the rest over SSH. To connect you need the Pi's address. Easiest is the hostname you set: on most home networks retropie.local will just work. If it doesn't, look in your router's admin page for the device, or — if you've still got a monitor attached — run hostname -I on the Pi to read its IP.

Step 3: Connect over SSH and update

From your main computer's terminal (replace you and the hostname with what you set):

ssh you@retropie.local

Accept the host key prompt the first time, enter your password, and you're in.

First, bring the system fully up to date. This matters more on a fresh image than people assume:

sudo apt update && sudo apt full-upgrade -y && sudo apt install -y git

That refreshes the package list, upgrades everything to current, and installs git, which the next step needs. The -y answers “yes” to the prompts so you can walk away while it runs.

Step 4: Get RetroPie and run the setup script

Clone the official setup script:

git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git

--depth=1 grabs only the latest state of the repository rather than its whole history — faster, smaller, all you need.

Then run it:

cd RetroPie-Setup

sudo ./retropie_setup.sh

On Trixie you'll get the text menu — carry on. (In the unlikely event of an “unsupported OS” complaint instead, that's the cue for the Bookworm fallback from Step 1.)

Step 5: Basic Install

The script opens a blue text menu. Arrow keys to move, Enter to select, Tab to jump to the buttons at the bottom.

Choose Basic Install — the top option — and confirm. This builds the core RetroPie setup: EmulationStation as the frontend, RetroArch and a sensible default set of emulators underneath.

It compiles a fair amount from source, so it's not instant — but on a Pi 5 it's the time it takes for you to go and make yourself a nice cup of coffee. Or a herbal tea, if you'd rather be caffeine free.

Step 6: Controllers, audio, and the bits worth knowing

When the Basic Install finishes and you reboot into EmulationStation, it should detect a connected controller and walk you through mapping the buttons. Hold any button to begin and follow the prompts. If you need to redo it later, it lives under the RetroPie menu inside EmulationStation → Configure Input.

Back in the setup script (sudo ./retropie_setup.sh), a few things are worth a visit under Configuration / Tools:

  • audiosettings — pin your output to HDMI or the analogue jack so you can hear those sweet, sweet melodies.

  • bluetooth — pair wireless controllers here if you're using them.

  • overclock / raspi-config — leave overclocking alone unless you have a reason and the cooling to back it up. The Pi 5 doesn't need it for the systems most people are here for.

Then reboot into the frontend:

sudo reboot

And you're done! Congratulations, you're now ready to play some games.

Let's play some games

The discussion about ROMs and how to acquire them are always a grey area. All I'm going to say is that the modern homebrew scene is quietly excellent, and you can buy many games for your retro system and they will play perfectly.

  • Micro Mages by Morphcat Games: A four-player NES platformer built from scratch by a two-person studio in Berlin, squeezed into 40 kilobytes through some genuinely clever engineering. It's tight, it's gorgeous, and it stands beside the best of the actual NES library. You can buy it on Steam or itch.io and the purchase includes the ROM — that's the file you drop onto the Pi. You're not pirating a thing; you're buying a game and being handed the cartridge.

  • Xeno Crisis by Bitmap Bureau: A brutal twin-stick arena shooter, originally a Mega Drive homebrew, since ported to roughly everything. Bitmap Bureau sell ROM downloads directly from their own shop — a bundle with versions packaged for different emulators — so again, you own the file because you bought it from the people who made it.

Toodle pip

That's everything you need to get started with Retropie on a Raspberry Pi 5.

You are entirely welcome to ignore everything I've just shared and run with Batocera, etc. Those options are much simpler and have the most active communities, currently.

But this is the place where my adventures with the Pi first began, so indulge an old man his sentimental reveries why doncha. Until next time!


Prompt for key visual

Midjourney: "gouache illustration, low three-quarter view from behind a chunky CRT television, its dark casing dominating the foreground, two kids on a floral overstuffed sofa leaning forward with controllers, faces brightly lit by the television's glow against a dim evening den, a wooden staircase climbing into shadow behind them, muted earth-tone palette, single warm light source from the screen, cozy and cinematic --ar 3:2 --s 350"

Read next

Cover Image for How to boot straight into PICO-8 on a Raspberry Pi

How to boot straight into PICO-8 on a Raspberry Pi

A single-purpose fantasy console, built from a headless Pi and about 30 minutes of patience. Power on, get PICO-8. No RetroPie, no desktop, no menu.

Cover Image for When the prompt becomes a creative brief

When the prompt becomes a creative brief

Writing a prompt that yields a specific image is closer to art direction than to drawing. But there are legal and ethical considerations, too.