How To Use DOSBox on Mac, Windows & Linux – A Detailed Guide

Everyone loves nostalgia. Whether it’s in the form of old pictures, videos, memorable places or something else, reliving the good old times is always joyous. And what times are better than those of our childhood, when everything was simpler. A constant in most of our childhoods were the old DOS games.

Nowadays most operating systems don’t support DOS programs and games. Luckily, there’s a way around that. Thanks to DOSBox, you can enjoy all your favorite DOS games and programs on your computer. We will show you exactly how to do so in this guide.

An old PC running Bomb Jack | Unsplash

What is DOSBox?

DOSBox is an open-source emulator that is capable of running old DOS games and programs. DOSBox is completely free and compatible with nearly every version of Windows, Linux and macOS. Compatible with a large variety of DOS games and programs, DOSBox is the best option for anyone looking to run DOS stuff on their PC without the hassle of actually having to install and use DOS.

Installing DOSBox

Depending on what operating system you’re using, the steps for installing DOSBox can vary. The installation process is very simple, no matter what OS. Just follow the steps below:

How to Install DOSBox on Windows

  1. First off, head over to the DOSBox download page. Click on Download Now. You should be redirected to another page and the installer will begin downloading automatically.
    Click on Download Now
  2. Once the installer has finished downloading, run it.
    Double-click on the downloaded file to run it
  3. Upon running the installer, the license agreement should appear. Click on Next.
    Click Next
  4. Next, it’ll ask what files you want to install. Click on Next again.
    Click Next
  5. After that it’ll ask you to choose the directory where DOSBox will be installed. Change the directory by clicking on Browse. Otherwise, click Install.
    Click on Browse if you want to change the directory and select Install when you’re done
  6. Finally, DOSBox will be installed in a matter of seconds. Click Close when the process finishes.
    Click on Close to terminate the installer

How to Install DOSBox on macOS

  1. Similar to Windows, click on the Download Now button. Again, you’ll be redirected and a DMG file will begin downloading.
    Click on Download Now
  2. Once it has finished downloading, open the DMG file.
    Open the DOSBox DMG file in your Downloads folder
  3. Next, select the DOSBox app inside the DMG file and drag it into the Applications folder.
    Select the DOSBox app inside the DMG file and move it to the Applications folder
  4. Open the Applications folder to see and confirm that DOSBox is now successfully installed.
    The DOSBox app should be present in the Applications folder
  5. If you’re using an Apple silicon Mac, you’ll need to install Rosetta. A prompt to install Rosetta will appear when you attempt to run DOSBox. Click on Install.
    Click Install
  6. Eject the DOSBox DMG from the side bar by pressing the Eject button or right-clicking on it and selecting Eject.
    Click on the Eject button
Apple silicon Macs don’t come with Rosetta preinstalled. You’ll only see this prompt if you have never used an app that requires Rosetta before. Otherwise, it should already be installed on your Mac.

How to Install DOSBox on Linux

Since there are multiple forks of Linux, the installation process can differ slightly. However, the only difference is the command you’ll run on the Terminal. Ubuntu users don’t need to run any command as DOSBox is available for download on the Ubuntu Software Center.

  1. To install DOSBox, press Ctrl+Alt+T or Ctrl+Shift+T on your keyboard to open the Terminal.
  2. Next, run the following commands based on the type of system you have:

For Debian-based systems

sudo apt-get install dosbox

Fedora/RHEL/CentOS based systems:

sudo dnf install dosbox

Arch-based systems:

sudo pacman -S dosbox

For Ubuntu and Ubuntu-based systems (if Software Center has been uninstalled):

sudo apt install dosbox

You might be asked for confirmation so proceed with the on-screen instructions to confirm the install. In most cases it will just be pressing ‘Y’ (yes):

Ubuntu Terminal asking for confirmation to install DOSBox

Setting up DOSBox

The instructions for setting up DOSBox are essentially the same for every operating system. Although we’ve explained the process for setting up DOSBox on macOS previously, we’ll be doing the setup this time on Windows.

Linux users will have to run this command on the Terminal to open the DOSBox application:

dosbox

DOSBox Setup 

  1. First, open up the DOSBox app. The app will open along with a DOSBox Status Window. Ignore this window.
    The start-up screen of DOSBox
  2. Next, you’ll have to mount a drive on your PC and designate a folder to DOSBox where it can find games and programs. You can choose a directory and drive of your choice. To do this, run the following command in DOSBox:
    mount (drive letter) (drive letter):\(path to directory)

    We’ve created a directory for our games called “Games” (how original) inside the C Drive, and thus are using this command:

    mount c c:\Games
    Mounting a folder for DOSBox

    For macOS, the command will be like this:

    mount (drive letter) ~/(path to directory)

    For Linux, the command is the same as macOS:

    mount (drive letter) ~/(path to directory)
    Mounting a folder for DOSBox on macOS
    As you can see in the screenshot above, we wrote mount c ~/Downloads/DOS which would mount the “DOS” folder inside Downloads inside C Drive. Make sure to mount the correct drive and directory for your computer.
  3. Now enter the drive letter as shown, to change the path where DOSBox is currently accessing:
    c:
    Change the drive being accessed by DOSBox
  4. Finally, run the following command to display the files present in the chosen path:
    dir
    Enter the command to access the directory

This command is not necessary if you already know what DOS games/programs you have inside this directory and what their names are. Otherwise, you’ll see a list of all the files present inside the directory, from which you can discern the name of the file you’re trying to run.

Editing the Config File

Since you’ll have to repeat the process of mounting the folder every time you open up DOSBox, it’s better to edit the config file once to quicken everything. This will allow you to launch DOSBox with the mounting process already done. Simply follow the steps below:

Modifying config file on Windows

  1. Open the folder where DOSBox is located. You can do this by right-clicking on the DOSBox shortcut and selecting Open file location
    Click on Open file location

    If you don’t have the DOSBox shortcut on your desktop, the program is installed in Program Files (x86) by default.
  2. Next, open the config file.
    Open the config file by double-clicking on it
  3. Now, the file should open up on Notepad. Scroll down to the bottom till you see the [autoexec] section.
    The [autoexec] section should be at the bottom of the config file
  4. Now, you’ll add the same commands you entered previously to mount the drive.
    mount c c:\Games
    c:
    dir
    Enter the following commands
    Reminder: Only put the “dir” command in here if you want DOSBox to show your directory’s content each time you open it. If not, you can omit this command and just write the first two.
  5. Hit Ctrl+S to save the config file and close it.

Modifying config file on macOS

To modify the config file on macOS, you need to access the Library folder.

  1. In Finder, press Command + Shift + S to open Library. Alternatively, you can click on “Go” in the menu bar and select Library from there.
    Select Library from Go
  2. Now, select the Preferences folder.
    Open the Preferences folder
  3. Type dosbox in the search bar towards the top-right and press Enter. A file named DOSBox 0.74-3-3 Preferences should pop-up, click on it.
    Search for dosbox and open the file
  4. This file is the same as the config file on Windows. Just find the [autoexec] section and enter the following commands:
    mount c ~/Downloads/DOS
    c:
    dir
    Edit the config file and save it
  5. Press Command + S to save the changes and close the file.

Modifying config file on Linux

  1. In order to alter the config file in Linux, we’ll have to use Nano, a text editor that comes pre-installed with most Linux systems. Enter the following command inside the Terminal:
    nano ~/.dosbox/dosbox-0.74-3.conf
    This command can be changed to suit the version of DOSBox installed.
  2. Next, scroll down until you see the to the [autoexec] section. Use your keyboard’s down-arrow key if your mouse doesn’t scroll here.
    Enter your commands in the [autoexec] section
  3. Finally, add the following commands in the [autoexec] section:
    mount c ~/Downloads/DOS
    c:
    dir
    Only enter the ‘dir’ command if you need it
  4. Press Ctrl+X to exit the nano editor, then press Y to save the edits to this config file.
    Exit the nano editor
  5. Press Enter to confirm your edits and then close the Terminal.
    Save the edits to the config file
     

Running Games and Programs on DOSBox

DOSBox is only an emulator and does not come with any built-in games or programs. Unfortunately, many DOS programs and games are not available for purchase. A handful of old classic games are available on the GOG Galaxy Store for purchase, but in most cases you’ll have to rely on the Internet.

You can find a surprising amount of old DOS games legally and ethically online. Some of the best sites include:

Any game or program you download will be in the form of a ZIP file, which you’ll then need to extract. Make sure you put the extracted contents directly into your DOSBox directory and NOT the extracted folder. Any folder inside your DOSBox directory will simply not work.

Launching a game

To run a game in DOSBox, follow these steps:

  1. Before launching a game, first complete the setup process and mount a folder.
  2. Next, enter the name of the game file you have. The game file should be .BAT or .EXE file. The extension of the game file is not necessarily required to be entered.
    Entering the game file name in the DOSBox app
  3. Upon running the command, your game should load up.
    Playing DOOM on DOSBox

Launching a program

The procedure of running a program on DOSBox are the same as the steps followed for running a game on DOSBox:

  1. Make sure that the directory is mounted.
  2. Next, enter the program’s file name. Again, there’s no need to enter the extension of the file.
    Enter the program’s file name
  3. Finally, the program will start after running the command.

    Running WordStar 4.0 on DOSBox

Handy Keyboard Shortcuts for DOSBox

Shortcut KeyFunction
ALT+EnterEnter/Exit fullscreen
CTRL+F1Starts the keymapper, which allows you to configure key bindings
CTRL+F5Take a screenshot
CTRL+ALT+F5Start recording gameplay
CTRL+F9Terminate DOSBox

Additionally, if you want to view a complete list of keyboard shortcuts for DOSBox, run the following command in DOSBox:

intro special

DOSBox Alternatives

Even though, DOSBox is as close to perfection an emulator can get, everyone may not be a fan. An alternative to DOSBox is PCem, an emulator whose main focus is to run older operating systems. PCem is free to download and use, and while the source code is free to view, it cannot be modified. PCem is only compatible with Windows and Linux.

Other alternatives include DOSBox-X and JsDOSBox.

Playing DOOM on Windows 95 via PCem | CryptidProductions on YouTube

Conclusion

Besides giving you nostalgia through old classics, DOSBox is also a very versatile tool for running compilers for older programming languages. DOSBox has also been utilized by many modern game studios in remaking or porting some of their most popular games. It is one of the most invaluable tools out there on the Internet. We hope you enjoy reliving some great childhood memories!

Frequently Asked Questions (FAQs)

What operating systems does DOSBox support?
DOSBox supports Windows 2000, XP, 7, 8, 10 and 11. It also supports Mac OS X versions and above, along with most Linux distros.

Is DOSBox compatible with every DOS game and program?
DOSBox is compatible with most DOS programs and games, but not all. You can check out DOSBox’s official compatibility list to see which games are compatible.

Can DOSBox mount a CD-ROM?
Yes, you can allow DOSBox to mount a CD-ROM by entering the following command (D represents the drive letter of the CD-ROM):

mount c D:\ -t cdrom

Is there a better user interface for the DOSBox app?
Yes. DOSBox has numerous user-friendly interfaces available for you to choose from. These are termed as “frontends“. They are available to download for free on the DOSBox download page.

ABOUT THE AUTHOR

Huzaifa Haroon


Born and raised around computers, Huzaifa is an avid gamer and a keyboard enthusiast. When he's not solving the mysteries of technology, you can find him scrutinizing writers, striving to inform the curious.