1. Home
  2. Linux
  3. Run ms dos on linux virtual machine

How to run MS Dos on Linux in a virtual machine

DOSBox allows Linux users to run DOS programs fairly smoothly on modern hardware. However, there are limits to what DOSBox can do, as it is an emulator and not a full-on operating system. For that, you’ll need FreeDOS. In this guide, we’ll go over how you can set up FreeDOS on your Linux PC so you can enjoy everything that DOS has to offer.

Downloading FreeDOS

Unfortunately, Microsoft doesn’t distribute MS-DOS anywhere, so in this guide, we’ll be using FreeDOS. Don’t worry! It’s DOS compatible and will run all of your favorite DOS video games and programs.

There are a few ways to get your hands on FreeDOS. In this guide, we’ll be using the OS Boxes VirtualBox release. The reason? Configuring and setting up DOS can be complicated if you’re not versed in it. With OS Boxes, everything is already taken care of. Just download and go.

To grab the latest release of FreeDOS for VirtualBox, head over to the FreeDOS download page on OS Boxes. Once on the download page, look for “VirtualBox (VDI) 32bit” in the “VirtualBox tab, and click on the blue download button next to it.

Let your browser download the FreeDOS archive file. It should only take a couple of seconds, as it is incredibly small (about 19 MB). When the downloading process is complete, follow the step-by-step instructions below to extract the files.

Step 1: Open up the Linux file manager and click on the “Downloads” folder to navigate to the location in which the FreeDOS archive is saved.

Step 2: Right-click on “1-2.7z” with the mouse to reveal the options for the file. In the menu that appears, look for “Extract” or something similar. Select it to extract the files.

Can’t see “Extract”? You may need to install the P7zip application. It handles all 7z archives on the Linux platform. Without it, you will not be able to extract the FreeDOS archive. For more information on P7zip, click here.

Step 3: After extracting the file, you will see a new folder in the “Downloads” directory with the name of “1.2”. Move the “1.2” folder into “Documents” for safekeeping. You don’t want to delete it accidentally!

Installing VirtualBox on Linux

In this guide, VirtualBox is critical. We need it to run FreeDOS. So, we must go over how to install it. To start the installation for VirtualBox on your Linux PC, launch a terminal. Then, follow the command-line installation instructions that correspond with the Linux operating system you currently use.


On Ubuntu, VirtualBox can be installed with the Apt command.

sudo apt install virtualbox


On Debian, you can get VirtualBox working with the Apt command.

wget wget https://download.virtualbox.org/virtualbox/6.1.12/virtualbox-6.1_6.1.12-139181~Debian~buster_amd64.deb
sudo apt-get install ./virtualbox-6.1_6.1.12-139181~Debian~buster_amd64.deb

Arch Linux

On Arch Linux, you can set up VirtualBox with the Pacman command.

sudo pacman -S virtualbox


To use VirtualBox on Fedora Linux, you must first enable the RPM Fusion Free software repository. Once the repo is enabled, install VirtualBox with the Dnf command.

sudo dnf install VirtualBox


On OpenSUSE, install VirtualBox with Zypper.

sudo zypper install virtualbox

Setting up FreeDOS in VirtualBox on Linux

Setting up FreeDOS in VirtualBox is very simple, thanks to VirtualBox’s autodetect feature. To start the process, launch VirtualBox on your Linux PC by searching for it in the app menu. When the app is open, follow the step-by-step instructions below.

Step 1: Select “Tools” at the top of VirtualBox to view the different options available in the app.

Step 2: Find the “New” button, and click on it with the mouse to create a new virtual machine. By clicking “New,” a pop-up will appear. This pop-up is the “Create Virtual Machine” window.

Step 3: In the “Create Virtual Machine” window, type in FreeDOS in the name box. After you finish typing the name out, VirtualBox will autodetect you are trying to set up MS-DOS and automatically configure your VM with the appropriate settings.

Click “Next” to continue.

Step 4: On the “Memory size” page, click “Next” to move to the next page. Do not change the configured memory from 32 MB.

Step 5: On the “Hard disk” page, select “Use an existing virtual hard disk file. Then, add the FreeDOS VDI file to VirtualBox using the UI.

To add the hard drive, click the folder icon to open up the hard disk selector. Then, click “Add” to add the drive to VirtualBox. Finally, select the FreeDOS VDI in the hard disk selector, and click “Choose” to tell VirtualBox to use that drive in the VM.

Step 6: Select the “Create” button to create your new FreeDOS virtual machine.

Once your FreeDOS VM is created, select it in VirtualBox, and click on the “Start” button to start it up. Enjoy!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.