FreeDOS is a free and open-source DOS-compatible operating system that allows you to run legacy DOS software and games on modern hardware. While Linux is a powerful and versatile operating system, there are times when you might need to run DOS-based applications for compatibility or nostalgia.
In this guide, I’ll walk you through the steps to set up FreeDOS on a Linux system using Qemu, a powerful open-source emulator.
What is Qemu?
Qemu is a generic and open source machine emulator and virtualizer that can emulate a full computer system, including the processor, memory, and peripherals, allowing you to run operating systems designed for different architectures.
Qemu is lightweight, fast, and perfect for running FreeDOS on Linux.
Why Use FreeDOS?
FreeDOS is a modern implementation of DOS that is fully compatible with classic DOS applications and games.
It’s ideal for:
- Running legacy software.
- Learning about DOS and its commands.
- Testing old programs in a controlled environment.
- Enjoying retro gaming.
Step 1: Install Qemu on Linux
Qemu is available in most Linux distribution repositories and to install it, open your terminal and run the following commands based on your distribution:
For Ubuntu/Debian:
sudo apt update sudo apt install qemu qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager
For Fedora:
sudo dnf install qemu qemu-kvm virt-manager libvirt libvirt-python libvirt-client virt-install virt-viewer
For Arch Linux:
sudo pacman -S qemu qemu-arch-extra virt-manager libvirt
Once installed, verify the installation by running:
qemu-system-x86_64 --version
Sample Output:
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6.24) Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
Step 2: Install FreeDOS Using Qemu in Linux
First, visit the official FreeDOS website and download the latest ISO image (FD14-LiveCD.zip), and save the ISO file to a directory, such as ~/Downloads
.
Next, you need to create a 2GB virtual disk in Qcow2 format to install FreeDOS, which is efficient and supports features like snapshots.
qemu-img create -f qcow2 freedos.img 2G
Now, extract the FD14-LiveCD.zip and boot the FD14LIVE.iso to install it on the virtual disk by running the following commands.
unzip FD14-LiveCD.zip qemu-system-x86_64 -hda freedos.img -cdrom FD14LIVE.iso -boot d -m 512

Once the virtual machine boots, select “Install to Harddisk” and press Enter.





Again choose the “Install to Harddisk” option, which will start formatting the drive.





After installation, you can boot FreeDOS directly from the virtual disk without the ISO.
qemu-system-i386 -m 64 -hda freedos.img -boot c

Run DOS Programs on FreeDOS in Linux
With FreeDOS up and running, you can now install and run DOS applications and games.
For example, to run a classic game like Doom:
- Download the Doom game files (e.g., doom1.zip).
- Extract the files to a directory on your Linux system.
- Mount the directory in Qemu using the
-hdb
option:
qemu-system-x86_64 -hda freedos.img -hdb ~/Games/Doom -m 512
Inside FreeDOS, navigate to the directory and run:
C:> doom.exe
Conclusion
By following this guide, you have successfully set up FreeDOS on Linux using QEMU. You can now run old DOS programs, play classic games, or experiment with DOS applications without needing dedicated hardware.