BlackTree Security · Infrastructure · Automation · AI

Modern DOSBox Setup: Folders, Mounts and Configuration

DOSBox remains one of the easiest ways to run classic DOS games and applications on a modern computer. The basic idea from my original 2016 setup still holds up: keep the emulated machine inside a dedicated host folder, mount only what DOS needs, and automate the repetitive commands. The details, however, deserve a modern update.

This guide replaces the original article completely. It uses safer directory mounts, separates shared and game-specific settings, and works as a foundation for both DOSBox Staging and DOSBox-X on Windows, macOS and Linux.

Quick recommendation

Use DOSBox Staging for most DOS games. Choose DOSBox-X when you need more detailed hardware emulation, DOS productivity software, or experimental Windows 3.x, 9x and ME installations. Keep each game’s special settings in its own configuration file instead of continually changing one global file.

Choose the right DOSBox variant

VariantBest suited toStarting point
DOSBox StagingDOS gaming, polished defaults and straightforward per-game setupsOfficial Windows releases
DOSBox-XDOS applications, unusual hardware, and Windows 3.x/9x/ME experimentsOfficial DOSBox-X wiki
Bundled game-specific buildsGames supplied by a store or collection with a tested configurationKeep the supplied build unless there is a reason to replace it

If you are starting from scratch, install the current stable release rather than a preview or release-candidate build. Existing configurations can contain settings that were renamed or superseded, so back them up before upgrading and let the new release create fresh defaults where its documentation recommends doing so.

Use an isolated host directory

Do not mount the root of your real system drive. DOS programs were written for an environment without modern file permissions or safety controls. Giving an old application access to an entire host drive is unnecessary and makes accidental changes much more expensive.

A practical Windows layout is:

C:\DOSBox\
├── drives\
│   └── c\
│       ├── games\
│       ├── tools\
│       └── temp\
├── images\
│   ├── cd\
│   ├── floppy\
│   └── hdd\
├── configs\
└── backups\

On macOS or Linux, use the same structure somewhere inside your home directory, for example ~/DOSBox/. The important point is not the exact path: it is keeping emulated files, disk images, configuration files and backups together without exposing unrelated host data.

Example DOSBox host folder structure for DOS utilities and disk images

Create a reliable basic mount

Start DOSBox and test the mount interactively before adding it to a configuration file:

mount c "C:\DOSBox\drives\c"
c:
dir

The quotes matter whenever a host path contains spaces. Inside DOSBox, the mounted directory becomes the root of C:; DOS applications cannot see the rest of the host path.

Equivalent examples for other hosts are:

# macOS
mount c "/Users/<username>/DOSBox/drives/c"

# Linux
mount c "/home/<username>/DOSBox/drives/c"

Automate startup with the autoexec section

Once the mount works, place the repeated commands in the [autoexec] section near the end of the relevant configuration file:

[autoexec]
@echo off
mount c "C:\DOSBox\drives\c"
c:
path z:\;c:\tools
cls

This creates a predictable C: drive and makes utilities stored in C:\TOOLS available without copying them into every game directory. The internal Z: drive already contains DOSBox commands and should remain in the path.

The original setup mounted a shared folder as E:. That still works, but C: is usually a better default because many installers and games assume they are running from the primary DOS hard disk.

Prefer per-game configuration files

A single global configuration becomes difficult to maintain as soon as one game needs a different machine type, sound card, processor speed or display setting. Keep general emulator behaviour in the primary configuration and put exceptions beside the game that needs them.

For example, a local dosbox.conf for a game installed in C:\GAMES\EXAMPLE can contain:

[autoexec]
@echo off
mount c "C:\DOSBox\drives\c"
c:
cd \games\example
example.exe
exit

The exit command closes DOSBox after the program ends. Remove it when you want to return to the DOS prompt for troubleshooting. Begin with emulator defaults and add only settings the game actually requires; copied configuration files often contain years of unnecessary tweaks.

Disk images and installation media

Keep floppy, CD-ROM and hard-disk images outside the mounted C: tree. This makes it easier to treat installation media as read-only and prevents DOS software from modifying the source images accidentally.

  • Use directory mounts for ordinary installed games, tools and save files.
  • Use image mounts when software depends on boot sectors, volume labels, disk swapping or copy protection.
  • Work from a copy of irreplaceable floppy or hard-disk images and keep the original in the backup directory.
  • Check the command reference for your DOSBox variant. Image-mounting syntax is evolving, and newer DOSBox Staging releases may prefer MOUNT where older configurations used IMGMOUNT.

Configuration and backup locations

DOSBox Staging can print the location of its primary configuration from a host terminal:

dosbox --printconf

Standard primary-configuration locations include %LOCALAPPDATA%\DOSBox\dosbox-staging.conf on Windows, ~/Library/Preferences/DOSBox/dosbox-staging.conf on macOS and ~/.config/dosbox/dosbox-staging.conf on Linux. Packaged Linux builds can use different locations, so --printconf is the safer check.

Back up the configuration together with the mounted drive and game-specific files. Save games are not always stored where you expect, so backing up the complete isolated DOSBox directory is simpler than maintaining a list of exceptions.

Common problems

  • “Directory does not exist”: check the host path and keep it inside quotes. Host paths are interpreted before DOSBox presents the mounted drive.
  • “Illegal command”: confirm that the executable exists, switch to the correct drive, and use DIR to verify the current directory.
  • A game runs too quickly or slowly: test processor-cycle changes at runtime first, then save a working value only in that game’s local configuration.
  • An installer reports insufficient space: directory mounts may report a conservative amount of free space. Consult the variant’s MOUNT help for its free-space option.
  • Sound or graphics are wrong: return to defaults, identify the hardware supported by the game, and change one setting at a time.

A note about DOS versions and utilities

DOSBox provides an integrated DOS-like environment, but it is not a licensed copy of MS-DOS. Most games do not need a separate operating-system installation. If you use historical MS-DOS files or commercial games, use software and disk images you are legally entitled to run. FreeDOS utilities can be useful, but test them per application rather than adding a large collection to every configuration.

Related BlackTree guides

Official documentation


Originally published in 2016 and completely rewritten in August 2026 to reflect current DOSBox variants, safer mounting practices and per-game configuration workflows.

Leave a Reply

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