1. Home
  2. Linux
  3. Play arcade games on linux using mame

How To Play Arcade Games Using MAME On Linux

Looking to take a trip down nostalgia lane and play some old arcade games with your Linux PC? Currently, the best way to emulate any arcade cabinet is to use MAME on Linux. This software is a multi-purpose emulator that makes it possible to run various types of arcade cabinet games on any PC. It’s open source, has a ton of features, and is very reliable.

Note: Addictivetips in no way encourages or condones the illegal downloading or distribution of ROM or BIOS files for MAME. If you choose to install MAME, please use your own game ROMs and BIOS files you’ve backed up to your PC, legally.

Install Mame On Linux

There are multiple implementations of the MAME emulation software. For most Linux distributions, it will be easy to grab and get going. For other Linux distributions, you’ll need to manually build the software.

The software runs as a full screen application that users can interact with using a mouse making it perfect for those looking to turn a Linux PC into an arcade cabinet. To install the software, open up a terminal, and do the following:


Mame is available for Ubuntu, but users can’t install it without first enabling additional software repositories. The one that needs to be turned on for the Mame emulator is “Universe”. To enable the Universe software source, open up a terminal and enter the following:

sudo add-apt-repository universe

The above command tells the system that it is OK to use Universe as a software source. The next step is to update the system and refresh the cache to reflect the changes we made. This is done with the apt update command.

sudo apt update

With universe enabled, Mame will install on Ubuntu:

sudo apt install mame


sudo apt-get install mame

Arch Linux

Mame is available for Arch Linux, but users will need to compile it in order for it to work. Here’s how to do it. First, open the terminal and use it to install the various dependencies that the software needs in order for it to build right.

sudo pacman -S base-devel git sdl2 gconf sdl2_ttf gcc qt5

Using the git tool, grab the latest version of the Mame source code.

git clone https://github.com/mamedev/mame.git

Enter the cloned Mame directory using the CD command.

cd mame

Lastly, compile the software.



sudo dnf install mame


sudo zypper install mame

Other Linuxes

Mame can easily be compiled on any Linux distribution with little trouble. The only requirements are basic compiling tools such as GCC, SDL and the framework. The source code itself is available on Github, and the developer also has instructions for compiling on Linux.

Configuring Mame

Mame isn’t like the other emulators on Linux and depending on how you install it takes a bit of time to get going. If you’ve installed Mame via a package manager (Ubuntu, Fedora and etc), open up a terminal window and enter: mame

This will run the emulator. Alternatively, try the quick launch menu. Press ALT + F2 on the keyboard, then type “mame” and press enter. Should open the fullscreen emulation app.

Note: the Mame emulation tool is also in your application launcher (if you installed it and didn’t build it).

On the first launch, the emulation tool will refuse to work. This is because there are no ROMs (or BIOSes for the many arcade cabinets) to work with. To add video game ROMs to the program, open up a terminal window and gain a root shell:

sudo -s

Next, navigate the terminal to wherever your ROM files exist on your PC.

cd /home/username/my-example-folder

Copy the ROM files over from the folder into the ROM directory.

cp -R /home/username/my-example-folder/* /usr/local/share/games/mame/roms

Compiling MAME from source rather than install it via a binary package? If so, the instructions above will not work. Don’t gain root in the terminal. Instead, you’ll need to do the following to get it going:

cp -R ~/my-example-folder/* ~/mame/roms

Each time you’d like to start the emulator:

cd ~/mame


Alternatively, open the file manager, navigate to /home/username/mame, right-click on mame64 and launch it.

Please keep in mind that no Arcade ROM files will work correctly without the proper BIOS files. Due to legal reasons, it is not OK to simply distribute these files on the internet. To obtain these files legally, and place them in the /usr/local/share/games/mame/ directory, or /home/username/mame/roms

Launching A Game

A game will only launch in Mame if it has the proper BIOS files. For example: to run Metal Slug 5, you’d need the NeoGeo BIOS files as well as the ROM for the game itself. Place the individual NeoGeo BIOS files inside of the Metal Slug 5 folder.

You may need to repeat this process for each game to work, as there appears to be no root BIOS directory to work with.

When the files are where they need to be, simply launch the Mame app, and use the menu chooser to select a game. From here, a warning message appears.

Configuring A Controller

Configuring controller inputs for players in the MAME emulator starts out by selecting “Configure General Inputs” at the start. This will open up a menu, with a list of control config settings for players 1 – 8. Plug in a gamepad and select the player you’d like to configure.

In each individual menu, the user must assign buttons to the player. Go down the list, select the control key, and press the enter key to re-map.

When the option to re-map starts, press the desired button on the gamepad, keyboard (and etc) to map the specific buttons to the current player. Please keep in mind that you will need to do this for each gamepad, and player.

Inserting Coins

Considering that MAME means “multiple arcade machine emulator”, the “insert coin” message appears often. Don’t worry, unless you install a coin-reader, and set it up, the software isn’t going to ask for quarters. Instead, you’ll need to press a button to simulate a coin being inserted.

Coin controls default to 5-8 on the number row. Press one to insert, and start the game. In addition, player start buttons are 1-4 (one button for each player).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.