Install RetroPie on Ubuntu

Overview
We are going to cover the procedure on how to install RetroPie on Ubuntu. Apart from that, we’re also going to showcase the steps how to setup RetroPie and also how to load games on RetroPie too.
We still have our favorite childhood games we love to come back to. Lucky for us, we are able to enjoy our old favorites even this day even if we don’t have the game console for it or the game is not supported by the system anymore. For that we can use emulators. But most of the emulators are for a single console only and not many support GNU/Linux.
So, if you fall in that category – a Linux user who still enjoys console classics, try – RetroPie. It’s a powerful emulator which supports many popular consoles(Atari, SNES, NES, Nintendo 64, GBA, Game Boy Color, PS1, PS2, Xbox etc…) and not only you can install it on your Debian/Ubuntu PC. You can also install it on a Raspberry PI and make yourself an arcade/console machine. The best part is – RetroPie is open source and free to use. Retropie is still maintained project and in the Retropie docs, it’s specified that Retropie will work Ubuntu versions from version 18.04 and later.
Underneath you can also find the video tutorial :
How to Install Retropie on Ubuntu
Downloading RetroPie
First step is to start the terminal(Ctrl+Alt+T keyboard shortcut), download the install files and install the RetroPie. There are set of terminal commands which are displayed down bellow:
Install the needed packages for the RetroPie setup script:
sudo apt-get install -y git dialog unzip xmlstarlet
Download the latest RetroPie setup script:
git clone --depth=1 https://github.com/RetroPie/RetroPie-Setup.git
Enter the folder with the setup script:
cd RetroPie-Setup
The script is executed with:
sudo ./retropie_setup.sh
Retropie installation
When you start the installation script, first you’ll get this screen.

Hit ok to continue

Installation will prompt you do you want to continue with basic installation – select Yes and hit enter.
Installation will start and it can take a while – in my case it took around 20 minutes to complete. After the installation is finished – you’ll return to the first screen of the setup. You can exit the setup.
Starting the retropie
You can start the retropie via terminal and from the app menu as well. To start the retropie using terminal, start the terminal and change directory to the folder where you installed the retropie and type in the command.

emulationstation

Retropie will start and it will ask you to setup your gamepad controler. You can also setup the keyboard and use it to play games. If you want to use keyboard or a gamepad, press any key on it so that Retropie can detect it.

On the next screen you need to configure gamepad mapping.

This is the starting screen. Now the next step is to add games.
Adding games
In order to play games using Retropie – you need ROM images to download and copy them in the retropie folder. Default folder location is /home/RetroPie/roms. In that folder, there are folders for each an
every game console(playstation, nintendo, xbox etc…). Copy the ROM image in the corresponding folder. ROM image must be for the proper console.

When you copy the games(ROM images), start the RetroPie emulator again. This time the welcome screen will be different. Retropie will automatically detect added ROM images and recognize for which game console are they. Menu will display consoles which contains games.

Select the console you want. The next screen will display all the games that are in the game folder.

Select your game and start it.

Summary
To summarize the article – We covered the steps how to install Retropie on Ubuntu Linux and how to configure it, play and add games.
At the moment, RetroPie is officially supported by default from the devs for Ubuntu and Debian. That’s why we covered the steps how to install Retropie on Ubuntu. With the same steps you can install it on the Debian as well. Not sure if they will release a version for other distros as well. But besides all that, Retropie is a powerful emulator with plenty capabilities to offer.
I hope you found the post useful. Thank you very much for the time.
I usually just install the separate emulators instead of retropie or retroarch. This is useful as well though I’ve tried it out.
Thanks for the feedback, I really appreciate it.
Hello i have recently started experimenting with Linux and this script has been running for like 6 hours. what do you think i should do.
The best part about Retropie is that the interface is all controller based. So you dont need to use a mouse and keyboard. It is great for creating a couch gaming experience that doesn’t require a lap desk.
The second command is not correct. This is the right one:
git clone –depth=1 https://github.com/RetroPie/RetroPie-Setup.git
Hi Andy,
Thanks for commenting, much appreciated. As I can see, the second command is the same as is on the github page. I can’t see what’s wrong. I also installed RetroPie successfully on my Mint machine.
Try –depth instead of –depth.
git clone –depth=1 https://github.com/RetroPie/RetroPie-Setup.git
Use 2 dashes – – instead of –
Oh, I see what it is now. Thanks for the clarification Christian. There are two dashes on the command line. It’s just how the theme font renders the characters when I quote the command lines. I can see how this can lead to confusion and I will update the post.
Thanks a lot for the help! It worked here.
Hey thanks a lot for leaving a feedback. Really appreciate the time you took to comment. I’m glad it’s working for you.
Hi, is there a way to read roms directly from an external HDD? I can’t find the right command!
Hi there Max… Thanks for commenting. I believe this post could help you with that…. https://github.com/RetroPie/RetroPie-Setup/wiki/Running-ROMs-from-a-USB-drive
Basically, RetroPie should be able to read a ROM automatically from a USB partition as long it is formatted as FAT32 and in the partition there’s a folder named – retropie-mount and in the Configuration and tools, option – USB ROM service is enabled. Cheers…
Hi. When I configure all keys on my keyboard, I need to press button OK but it does not working, nothing happenes. Please help me.
HI mate, how do i copy the roms? Thanks
Hi there,
First to thank you for finding time to comment. This post is written in a way that it’s presumed you’ve downloaded game roms on your PC. In the RetroPie folder, there’s the roms folder and inside of it, there’s a separate folder for each game console. The roms file must go in the proper game console , ie, if you have the Game Boy Advanced rom file then it needs to go in the gba folder and etc.
The method of copying the roms – well you can copy with the regular copy and paste using the mouse or using the terminal(example – the roms are in the Downloads and you need to copy them to the RetroPie rom folder and RetroPie is installed in the home folder).
sudo cp /Downloads/nameoftheromfile.rom /RetroPie/roms/gba/nameoftheromfile.rom
Hope this helps,
If not – then I apologize if I misunderstood the question.
Regards,
Hi Mark,
I installed RetroPie on my Ubuntu 22.04 system and most of it is working great. However, I cannot play the playstation roms. Have you had this issue or know how to fix it?
You may have to copy the psx bios .bin file/s to the RetroPie/bios subfolder.