Mastering DOSBox: A Step-by-Step Guide to Downloading and Running Programs

Saadaan Hassan
4 min readSep 8, 2023

--

In the fast-paced world of modern computing, it’s easy to forget the roots of our digital era. DOS, or the Disk Operating System, was once the kingpin of personal computing. While it may seem like a relic from the past, there are still instances where you might want to run DOS programs or games on your contemporary computer. This is where DOSBox comes to the rescue.

DOSBox is an open-source emulator that allows you to run DOS-based software on modern Windows, macOS, Linux, and other operating systems. Whether you’re feeling nostalgic or have a specific application or game in mind, this blog post will guide you through the process of downloading DOSBox and running a file with it.

Let’s embark on this journey into the digital past and unlock the power of DOSBox.

Downloading DOSBox

Windows:

  1. Download DOSBox:

2. Install DOSBox:

  • Run the downloaded installer.
  • Follow the on-screen instructions to complete the installation.
  • DOSBox will create a shortcut on your desktop.

3. Run DOSBox:

  • Double-click the DOSBox shortcut to launch the emulator.
  • You’ll be greeted with a DOS-like command prompt where you can run your DOS programs or games.

macOS:

  1. Install Homebrew (if not already installed):
  • Open Terminal, which you can find in the Utilities folder within the Applications folder.
  • Install Homebrew by pasting and running the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. Install DOSBox:

  • After Homebrew is installed, you can install DOSBox by running the following command in Terminal:
brew install dosbox

3. Run DOSBox:

  • Once the installation is complete, you can run DOSBox by simply typing dosbox in the Terminal and hitting Enter.

Linux (Ubuntu/Debian):

  1. Open Terminal:
  • Press Ctrl + Alt + T to open the Terminal.

2. Install DOSBox:

  • To install DOSBox on Ubuntu or Debian-based systems, run the following command:
sudo apt-get update
sudo apt-get install dosbox

3. Run DOSBox:

  • After the installation is finished, you can start DOSBox by typing dosbox in the Terminal.

Linux (Fedora):

  1. Open Terminal:
  • Press Ctrl + Alt + T to open the Terminal.

2. Install DOSBox:

  • To install DOSBox on Fedora, run the following command:
sudo dnf install dosbox

3. Run DOSBox:

  • After the installation is complete, you can start DOSBox by typing dosbox in the Terminal.

Now that you have DOSBox installed on your preferred operating system, you can proceed to use it to run DOS programs and games by mounting directories and executing files within the emulator. Enjoy your journey into the world of classic computing!

Running DOS Programs

Running DOS programs or games in DOSBox is straightforward once you have the emulator set up. Here’s a step-by-step guide on how to run DOS programs using DOSBox:

Mounting Drives:

Before you can run DOS programs, you need to mount the directory where your programs or games are located as a drive in DOSBox. You can mount different directories to various drive letters (like C:, D:, etc.). Use the following command to mount a directory:

mount [Drive Letter] [Path to Directory]

For example, to mount a local directory “C:\DOSGames” as the D: drive in DOSBox:

mount d C:\DOSGames

Navigating to the Program Directory:

Use DOS commands to navigate to the directory where your program or game is located. The primary commands include:

  • dir: List files and directories in the current directory.
  • cd: Change the current directory.

For example, if your game is in a directory called “Game” under the mounted drive D, use these commands:

d:
cd Game

Running the DOS Program:

Once you’re in the directory containing your program or game, you can execute it by simply typing the program’s executable file name (typically ending in .exe) and pressing Enter. For example:

game.exe

Replace “game.exe” with the actual name of your program.

Exiting the Program:

When you’re done with the program, you can exit it by following its in-game instructions or using common DOS commands like:

  • exit: To return to the DOS prompt and close the program.
  • Ctrl + F9: To exit DOSBox entirely and return to your host operating system.

The following video shows how to run the DEBUG program for assembly language using DOSBox:

Adjusting DOSBox Settings (Optional):

DOSBox allows you to customize settings for specific programs or games. For instance, you can adjust the CPU cycles, screen resolution, or sound settings within DOSBox by editing its configuration file (typically named dosbox.conf). To access the configuration file, use a text editor or a DOSBox-specific configuration tool.

Capturing Screenshots (Optional):

If you want to capture screenshots of your DOS programs or games while running DOSBox, press Ctrl + F5. The screenshots will be saved in the "captures" folder within your DOSBox program folder.

That’s it! You should now be able to mount drives, navigate directories, execute DOS programs or games, and exit them gracefully in DOSBox. Enjoy your journey into the world of classic computing and gaming nostalgia.

--

--