DOSBox – Runs Old MS-DOS Games/Programs in Linux

Ever wanted to play old DOS games or use old compilers like Turbo C or MASM to run assembly language code? If you have and were wondering how, then DOSBox is the way to go.

Install DosBox in Linux

DosBox for Linux

What is DOSBox?

It is an open source software that emulates a computer running MS-DOS. It uses the Simple DirectMedia Layer (SDL) which makes it very easy to port to different platforms. As a result DOSBox is available for a wide range of Operating Systems like Linux, Windows, Mac, BeOS etc.

Installing DOSBox in Linux

If you are on Ubuntu, you can install it directly from the Software Center. For other Debian based systems in general, you can use sudo apt-get to install it. The command for it is as follows.

$ sudo apt-get install dosbox

For other Linux flavours like RHEL, CentOS and Fedora, you can compile and install it from source as follows. Download the latest source file using following wget command.

# wget

Navigate to the directory in which the file was downloaded and run the following commands.

# tar zxf dosbox-0.74.tar.gz
# cd dosbox-0.74.tar.gz
# ./configure
# make
# install

How to Use DOSBox

Once you start DOSBox, you’ll have to first mount the part of your system want to access inside DOSBox.

mount <label> <path-to-mount>

To mount your whole Home directory as C, you can run the following command.

mount C ~

Then type in <label>: If you have to mount the same directory and cd into the same location every time, then you can automate the whole process with the help of the DOSBox configuration file.

This file is located in ~./dosbox directory. The name of the file will be dosbox-[version].conf where version is the version number of dosbox which you installed. So if you have installed version 0.74, you’ll run the following command:

gedit ~/.dosbox/dosbox-0.74.conf

So, if you want your DOSBox to auto mount the home directory and go into ~/TC folder every time DOSBox starts, you can add the following lines at the end of the configuration file.

mount c ~
cd TC

There are many more options available in the configuration file. For example, if you want DOSBox to always start in full screen mode you can edit and change the value of fullscreen parameter from false to true.

Many other options and description of them is given in the configuration file itself. Also, if you want to add comments anywhere in the configuration file, you can do so by using the # character at the start of that particular line.

Installing Few Games and Programmes

If you are a student of Computer Science in India then you must have used this at some point of time in your School or College. Although it is a pretty outdated compiler most Colleges still use it because of their inability to keep up with modern compilers.

1. Turbo C++

Download the latest TC++ from the below link and extract it’s contents in your home directory.


Now start DOSBox and run the following commands.

mount c ~
cd tc3

Change the source drive to C in the installation menu.

Turbo C++

Turbo C++

Keep the directory for installation as the default one and start the installation procedure.

Install Turbo C++

Install Turbo C++

After this, TC++ would have been installed in the location C:/TC. You can run it using the following commands.

cd /TC
cd bin
Start Turbo C++

Start Turbo C++

2. Wolfenstein 3D

It was one of the most popular first-person shooter game in the 90’s when it was released and is even today widely popular in the DOS games world. So if you want to have some vintage video game action, the steps to install it are given below.

Download the zip file from the below link and extract its contents to your home directory.


Now start DOSBox and run the following commands.

mount c ~
cd wolf3d

Select C drive as the installation drive as shown in the screen-shot below.

Wolfenstein 3D

Wolfenstein 3D

Select the default directory for installation and press enter.

Install Wolfenstein 3D

Install Wolfenstein 3D

After this, Wolf3d would have been installed in the location C:/Wolf3d. Once inside the C:/Wolf3d directory, you can enter “wolf3d” to run the game.

Start Wolfenstein 3D

Start Wolfenstein 3D

3. MASM(Microsoft Macro Assembler)

If you want want to run assembly language code then you need an assembler like MASM or TASM (Turbo Assembler).

Download the rar file from the below link and extract its contents to your home directory.


Now start DOSBox and run the following commands.

mount c ~
cd masm611/disk1

Let all the files be installed to their default locations and select the Operating System in which you want your programs to run.



Once setup is finished, you can run asm files by running the following commands from the C:/MASM611/BIN directory.

masm <filename>.asm
link <filename>.obj

4. Prince of Persia

This was the first game that I played on a computer! It was very popular while I was growing up in the early 2000s in India. So if you too have fond memories like me of playing this game as a kid and would like to revive them, here are the instructions to install it in DOSBox.

Actually, you don’t need to install it, you just need to download the zip file extract it somewhere and you can play the game in DOSBox directly by entering “prince” from that location. Here are the steps for it.

Download the zip file from the below link and extract its contents to your home directory.


Now start DOSBox and run the following commands.

mount c ~
cd prince
Prince of Persia Game

Prince of Persia Game

Reference Links

  1. DosBox Homepage

This was my very first article on Tecmint, so please feel free to comment about how you thought the article was and any suggestions if you have them for me. Also, you can post your doubts as comments if you run into some problem during installation of any game/program in DOSBox.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Narad Shrestha

He has over 10 years of rich IT experience which includes various Linux Distros, FOSS and Networking. Narad always believes sharing IT knowledge with others and adopts new technology with ease.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

8 Responses

  1. prem says:

    the commands are not working for my mint os dosbox

  2. anitha says:

    Thanks a lot…..i was searching for a way to work with MASM on centos. I have to try it. glad to know that i can do it…..Thanks again…

  3. makhauser says:

    Yeah, one of my favourite apps. I use it everyday, especially – to play DooM II. Thanks for some commands, Ctrl+D ;)

  4. kaaposc says:

    Great article just because wolf3d and prince of persia were mentioned. And please, CHANGE THE FONT on screenshots!

  5. Mayuri says:

    Thanks mate. Helped me install DOS for masm compilation :)

Got something to say? Join the discussion.

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.