Home » ubuntu » How to run DOS in Ubuntu

How to run DOS in Ubuntu



Although you’ll rarely need to run DOS under Ubuntu it does no harm to know how it is done. There are some great things you can do in DOS, for instance, run the good old DOS games, if nothing else.

The fans of DOS loved the operating system for its sturdiness and the ability to use the command prompt but if you like doing simple things in a difficult manner in Ubuntu you can run all commands on the Terminal windows.

Anyway, in order to run DOS under Ubuntu you require DOSBOX. You can install it either through the Synaptic Package Manager or by simply running the following command in the Terminal window:

sudo apt-get install dosbox

This installs DOSBOX on your computer. In order to run your DOS programs under Ubuntu now you need to create a folder, preferably using the path:

/home/username/dosprogs

“username” can be your name, or whatever login name you use with your Ubuntu system. Once that’s done, move all your DOS programs to this folder.

You can run DOSBOX using the following command in the Terminal window:

sudo dosbox

Initially you’re in Z: drive and if you try to go to C: drive you cannot go. So every time you launch DOSBOX you’ll need to mount your folder to a drive using this command (in the DOSBOX prompt):

mount h /home/username/dosprogs

This way whatever resides in “dosprogs” whether files or folder, can be accessed once you’ve gone to H: drive.

But it can be tedious to mount your folder to a drive each time you start DOSBOX. You can do it automatically each time you start the DOS utility under Ubuntu.

How to auto-mount a drive in DOSBOX

Start DOSBOX and at the Z: prompt execute

config -writeconf /home/username/dosbox.conf

This creates a DOSBOX configuration file in your home folder. Please note you need to create this file in your username folder and not in dosprogs.

You can quit DOSBOX after this.

Then open this newly-created file in gedit and go to the line that has [autoexec].

Under that line, just add

mount h /home/username/dosprogs

and save the file. The next time you launch DOSBOX this folder will already be mounted on a drive.

2 thoughts on “How to run DOS in Ubuntu

  1. Peo

    Very well – it works! I have again access to many things I missed for a longer time …
    Anyway, certain things in a special DOS program I use very often don't work in DOSBOX
    but do work in DOSEMU. Would it be possible to make a comparable 'How To Do':
    How to run DOS in Ubuntu with DOSEMU (my trials failed ..) – Thank you, PEO

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>