Open-source project
dosemu2/dosemu2 avatar
dosemu2/dosemu2

dosemu2: running DOS programs under Linux from a native binary

Run DOS programs under linux:

737 stars76 forksCGPL-2.0

At a glance

What is it?
dosemu2 is a C emulator that runs DOS programs on Linux and can also boot a DOS as a virtual machine. It ships distro packages for Ubuntu, Fedora and openSUSE, and its configuration is a plain text rc file plus a DOS drive directory you can populate yourself.
Who is it for?
Adopt dosemu2 when you need to run a DOS program on a Linux host, either a single executable or a whole DOS installation booted as a virtual machine, and you are willing to supply the DOS side yourself. Do not adopt it for protected mode software that needs a specific video driver or sound setup, since the emulator is still published as 2.0 pre-release tags and the documentation does not promise full hardware coverage.
Can I use it commercially?
Yes, with conditions. GPL-2.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly C, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Two jobs: a DOS runner and a DOS virtual machine

The README states the scope in two sentences. dosemu2 is an emulator for running DOS programs under linux, and it can also serve as a VM to boot various DOSes. Those are different uses and they attract different users. The first is for someone with a DOS executable, a shareware game or an old business tool, who wants it to run on a modern Linux box without a full virtual machine stack. The second is for someone who has a DOS installation, with its own config.sys and autoexec.bat, and who wants that environment to boot under emulation. The primary language is C and the licence is GPL-2.0, with COPYING and COPYING.DOSEMU both in the tree, which reflects the fact that some of the emulated code originated in the earlier dosemu project. The topic list is short, dos, dosemu and emulator, and there is no hint of a broader scope.

Installing from a distribution package

You do not have to build this to use it. The README lists binary packages for three families, each with its own repository link: a Launchpad PPA for Ubuntu, a COPR for Fedora, and an openSUSE Build Service project. That covers the common enterprise and workstation distributions, and the packaging is maintained outside the source repository, which means the version you get depends on your distribution's release cycle rather than on the tags in this repository. The source tree also carries Dockerfile.alpine and Dockerfile.debian alongside a debian/ directory and a dosemu2.spec file, so container builds and RPM packaging are part of the project's own tooling. For a source build, the tree includes an autotools setup with configure.ac, autogen.sh, default-configure and m4/, plus a Makefile that regenerates configure from configure.ac with autoreconf and runs autoheader to produce config.hh.in.

Running a program, and running it from a DOS path

The command surface is small enough to learn in a minute. Typing the executable name starts an emulator session, and the -E option runs a given DOS command and exits, unless you add -T to keep the emulator alive afterwards.

bash
dosemu
bash
dosemu -E <dos_cmd>

Running a DOS program that lives in a Unix directory takes either a -K option pointing at the directory, or the program path followed by a double dash and the arguments for the DOS side.

bash
dosemu -K <unix_dir> -E <dos_cmd>
bash
dosemu <unix_full_path> -- <dos_prog_args>

The -K syntax also accepts a DOS path instead of a Unix one, and the README explains the leading colon that marks that difference, since it is easy to miss. You can pass both, in which case the Unix directory becomes the DOS drive and the second part is a directory to change into before running the program.

bash
dosemu -K ~/dosgames:carma -E carma.exe

In that example the drive is created for ~/dosgames, the emulator changes into the carma directory and runs carma.exe from there.

The configuration is one rc file and one global reference

Configuration follows the classic Unix pattern of a global file with defaults and a per-user override. The README says a per-user configuration file can be created as ~/.dosemu/.dosemurc, with custom settings added there, and that the global configuration file /etc/dosemu/dosemu.conf is where you look for existing settings, their descriptions and default values. It points at $_hdimage as probably the first setting to look into, because that is what configures host filesystem access, and that is the setting you will want to understand before you point the emulator at anything sensitive. Boot customisation is done in DOS itself: you create c:\userhook.sys and c:\userhook.bat files, where userhook.sys can contain config.sys directives and userhook.bat can contain custom boot commands. That is a neat design, because the parts of the boot that are DOS-specific stay in DOS configuration files rather than in a second, competing config format.

Where your DOS files actually live

The filesystem layout is the part of the model that surprises people who expect an image file. Drive C: is usually located at ~/.dosemu/drive_c, and you add DOS programs there. If you would rather not copy files around, the README gives you the -d option, which mounts a Unix directory as a new DOS drive. Between the two, the mount option is the more convenient path for a large collection of shareware, because it lets you keep the files in their normal Unix directory structure and expose them as a drive. The global settings file also documents the parameters for the rest of the emulator, so a full read of /etc/dosemu/dosemu.conf before the first run is the cheapest way to know which knobs exist.

Where dosemu2 stops short, and what the alternatives cost

The honest limitation is the release state. The most recent release tags are pre-releases, 2.0pre9 from 2022-01-30, 2.0pre8 from 2017 and 2.0pre7.1 from 2017, so the published artefacts have not moved much in years even though the repository is not archived and the last push was on 2026-10-20, with the default branch named devel. That combination, a busy development branch and old pre-release tags, tells you that this is maintained work that has not reached a numbered release, and it should be planned for accordingly. The second limitation is scope: an emulator of this kind reproduces a specific slice of the DOS hardware environment, and the README does not promise full coverage of every accelerator, sound card or protected mode driver. The realistic alternative for someone who needs a full DOS machine with a real graphics driver is to run a general purpose virtual machine with a DOS disk image, which buys broad hardware emulation at the cost of a heavier, licence-encumbered stack and a licence for the guest operating system. dosemu2 is the lighter option for running programs, not for recreating a specific PC.

Licence, bug reports and the shape of the tree

The licensing is GPL-2.0, with COPYING and COPYING.DOSEMU both present at the root, and THANKS, BUGS, TODO, NEWS.md and a set of ChangeLog files alongside them, which is the layout of a long-lived project that keeps its history in the tree. The source is organised under src/, with man/ for the manual pages, doc/ for further documentation, etc/ for packaged data files, scripts/, test/, m4/ for autoconf macros and a plugin_list file that suggests the emulator core can be extended with plugins. The build is also configured for several environments, with configure-cyg64 for Cygwin and configure-emsdk for the Emscripten toolchain, the latter pointing at building the emulator as WebAssembly. The README asks for bug reports to be filed on the issue tracker, and the CI scripts in the tree, ci_build_or_install.sh, ci_prereq.sh, ci_test.sh and ci_test_prereq.sh, show that the project exercises an install and a test cycle in automation.

Editorial conclusion

Adopt dosemu2 when you need to run a DOS program on a Linux host, either a single executable or a whole DOS installation booted as a virtual machine, and you are willing to supply the DOS side yourself. Do not adopt it for protected mode software that needs a specific video driver or sound setup, since the emulator is still published as 2.0 pre-release tags and the documentation does not promise full hardware coverage. Before you start, read /etc/dosemu/dosemu.conf for the defaults, set $_hdimage for host filesystem access in ~/.dosemu/.dosemurc, and put your DOS programs under drive_c, then confirm the emulator behaves as expected with a copy rather than your only copy of a program.

Frequently asked questions

How do I run a DOS program with dosemu2?

The README says to type dosemu to run an emulator, and to use dosemu -E <dos_cmd> to run a DOS command and exit, adding -T to not exit. Programs in a Unix directory run with dosemu -K <unix_dir> -E <dos_cmd>.

How do I install dosemu2 on Ubuntu, Fedora or openSUSE?

Binary packages are listed in the README for each family: a Launchpad PPA for Ubuntu, a COPR at copr.fedorainfracloud.org for Fedora, and an openSUSE Build Service project for openSUSE.

Where does dosemu2 keep its configuration?

A per-user configuration file can be created as ~/.dosemu/.dosemurc, and the global file /etc/dosemu/dosemu.conf lists the available settings with their descriptions and default values. The README suggests looking at $_hdimage first, because it configures host filesystem access.

Where do I put the DOS programs for dosemu2?

Drive C: is usually located at ~/.dosemu/drive_c, where you can add DOS programs. You can also run dosemu -d <unix_dir> to mount a Unix directory as a new DOS drive instead of copying files in.

Can I customise the DOS boot sequence in dosemu2?

Yes. The README says to create c:\userhook.sys and c:\userhook.bat files, where userhook.sys can contain the config.sys directives and userhook.bat can contain custom boot commands.

Official sources

  1. dosemu2/dosemu2 on GitHub
  2. License: GPL-2.0
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/dosemu2-dosemu2.svg)](https://hysenlabs.com/projects/dosemu2-dosemu2)

Was this useful?