DOSBox – Run classic DOS games on your Linux PC

Using DOSBox, you can run your classic DOS games and compilers like Wolfenstein 3D, Prince of Persia, Turbo C++, and MASM on your Linux computer.

DOSBox is an open-source software that creates a virtual MS-DOS compatible environment, including sound, graphics, and basic networking. It enables you to run DOS applications without any modifications.

Using this wonderful app, you can run your classic DOS games and compilers like Wolfenstein 3D, Prince of Persia, Turbo C++, and MASM on your Linux PC.

DOSBox makes use of Simple DirectMedia Layer (SDL), a library designed to allow low-level access to hardware components like a mouse, keyboards, sound system, and graphics. It has made the whole process of porting easier to various platforms. Currently, DOSBox runs on several platforms like different Linux, Windows, and macOS.

Installing DOSBox Emulator on Linux

On Ubuntu

Ubuntu users can download DOSBox from Ubuntu Software Center.

DOSBox in Ubuntu Software
DOSBox in Ubuntu Software

For any other Debian distribution, use the apt or apt-get command to install DOSBox.

sudo apt-get install dosbox

DOSBox will be installed, and you can find it under the applications menu. For other Linux distributions, you will have to download the tar.gz file from the link below.

Download DOSBox

You can also download the setup using wget command.

sudo wget[link-to-download].tar.gz

After downloading the tar.gz setup file, we need to compile and install the app using the procedure below.

Step 1) Open Terminal and navigate to the tar.gz directory. For this article, we placed the setup on the Desktop.

cd Desktop

Step 2) Since it’s a compressed file, we need to extract it. Use tar command.
tar [file-name]

tar zxf dosbox-0.74-3.tar.gz

Note, your file name might be different depending on the DOSBox release you downloaded or the site from which you downloaded the setup.

Step 3) Navigate to the extracted file.

cd dosbox-0.74-3/

Step 4) Execute the configurations file


Note, you need to have a GCC compiler installed; otherwise, it will raise an error. “no acceptable C compiler found in $PATH.”
Step 5) Create an executable program and library to start the installation.


Step 6) Start the installation process.


Getting started with DOSBox

Launch DOSBox from the application menu. A window will pop up with two panes. The status pane and the command line pane. 

Launch DOSBox
Launch DOSBox

Before running any application in DOSBox, we need to mount a directory that shall hold all the necessary files. Just like a virtual machine, the DOSBox environment is separate from your filesystem.

To mount the directory you want to access inside DOSBox, use the following command syntax.

mount <label> <path-to-mount>

The label can be any letter like C, D, etc. Let’s use C for this particular post. Path-To-Mount can be any preferred location. Here, we will mount a folder on the Desktop named, DOSBOX_Programs.

mount C /home/tuts/Desktop/DOSBOX_Programs

Once you have mounted your directory of choice, you can now proceed to install your classic games. However, there are still a few tweaks you can do to make to personalize DOSBox to your liking. To do this, we need to access the DOSBox configuration (conf) file.

It is a hidden folder located in the home directory. All hidden files start with a (.) dot. In case you are not able to see these hidden files, hold CTRL + H.

Dosbox installation folder
Dosbox installation folder

Open the folder, and you should see the DOSBox conf file. Open the file using any text editor installed on your computer.

dosbox conf file
DOSBox conf file

One of the tweaks we should perform is making DOSBox automatically mount the directory assigned to it. Whenever you log out or reboot your computer, you will have to mount the directory again using the commands above.

To automate this process, open the DOSBox conf file and add the following lines at the bottom. Don’t forget to replace the path with your path.

mount C /home/tuts/Desktop/DOSBOX_Programs
cd /home/tuts/Desktop/DOSBOX_Programs

Another tweak you can perform is open the DOSBox window in fullscreen when launched. You can do this by changing the fullscreen parameter from false to true. You can go through the various parameters in the DOSBox configuration file and personalize it to your liking. 

Note, it is essential to make a copy of this file just in case you tamper with the original configurations causing some errors to your DOSBox application. 

Installing DOS games in DOSBox

Wolfenstein 3D

It is a shooting video game released in May 1992 and very popular in its time. Since it was designed to play on MS-DOS, Wolfenstein cannot run on other platforms.

To get started with the installation, first, download the zipped file from the link below. 

Download Wolfenstein 3D

Copy the data to the directory you mounted in DOSBox and extract it. On the DOSBox command line, type the following commands. As usual, replace the path in the below command-line with your file path.

mount C /home/tuts/Desktop/DOSBOX_Programs
cd [file-name] e.g
cd 1WOLF14

instaling Wolftein3D
installing Wolftein3D

Once the installation process is complete, launch Wolfenstein 3D by typing the command wolf3d to run the game.

Play Wolfstein3D
Play Wolfstein3D

Prince of Persia

It was a video game developed for Apple II in 1989. Just like the title says, the game takes place in ancient Persia. The player controls the Prince, who ventures through dungeons to save prisoners and defeat the grand vizier Jaffar.

Unlike Wolfenstein 3D, you don’t need to install Prince of Persia. All you are required to do is download the zipped file, extract the contents in the DOSBox directory, and type prince in the command line to start the game. 

Download Prince of Persia

Extract the contents in the DOSBox mounted directory. On the DOSBox console, type these commands.

mount C /home/tuts/Desktop/DOSBox_Programs

Play Prince of Persia
Play Prince of Persia


Those are a few DOS games that you can install and run on your Linux PC using the DOSBox emulator. There are several others including DOOM, Quake, Cosmo Dragon, dark Forces, etc. that you can enjoy playing on your Linux PC in a similar way. You can also use DOSBox to run DOS compilers like Turbo C++ and MASM (Microsoft Macro Assembler).

Arun Kumar
Arun did his bachelor in computer engineering and loves enjoying his spare time writing for FOSS Linux. He uses Fedora as the daily driver and loves tinkering with interesting distros on VirtualBox. He works during the day and reads anything tech at night. Apart from blogging, he loves swimming and playing tennis.


  1. Mr Arun Kumar,
    The article regarding DOS BOX was most helpful.
    I was desperate to run an old dos application and also show my grand son DOS game prince of persia.
    Thank you.


Please enter your comment!
Please enter your name here





“I am because you are,” is the themed meaning behind the famed Ubuntu operating system. Moreover, this mindful phrase is practical because it continues to lure more individuals into the Ubuntu universe. Because great power beckons great responsibility, Ubuntu is stepping up. It realizes that different users will want to use the Ubuntu operating system software differently.
The Ubuntu Cinnamon Remix brings together Linux Mint's Cinnamon desktop with the Ubuntu Core. While some users are welcoming the new flavor of Ubuntu with open arms, others are scratching their heads, wondering where it fits in.

10 Linux Based Mini PCs to Buy in 2020

It won't be wrong to say that mini PCs have all the potential in the world to take over the computer market shortly. Not only do they save a lot of space on your computer desk but also work in a very power-efficient manner while also causing less noise. Although they could be a tad more expensive than regular desktop PCs, they will actually save you some money in the long run.

The 10 Best Linux Network Monitoring Tools

Having total control over your network is essential to prevent programs from overusing your network resources and slowing down the overall performance. This is why you should install a network monitoring tool on your system, giving you a visual overview of everything that's happening on your network. Networking Tools are like swiss-knife for the system administrators for troubleshooting system issues.

The 10 Best Free and Open-Source CAD Software

Making its way into the world somewhere in the 1960s, Computer-Aided Design, or better known as CAD, has thoroughly revolutionized design and drawing, constituting a multi-billion market in the US alone. Today, this technology is extensively utilized in engineering-based manufacturing industries and design creations. Products are bought, sold, and traded in millions of Dollars, and this is how CAD flourishes in sectors.

Top 5 reasons to switch from Windows to Linux right now

Do you love Windows or Linux? Being on a Linux website, it's not hard to take a guess, but what are the strong reasons to switch to Linux? Linux is a 100% free OS. Is that reason alone enough? Let's find out! Never have there been more compelling reasons to make the switch. Here are just five great reasons for users to create that magical move from the wayward world of Windows to the lauded land of Linux.