Setting Up DOSBOX in Ubuntu to run Turbo C
DOSBOX is a x86 architecture emulator which helps to run older DOS based programs in modern computers running Windows or Linux. It creates a layer where all DOS programs can run from its own installation directory by mounting a virtual drive.
How to Install Dosbox
To install DOSBOX in Ubuntu 16.04 LTS and above, open GNOME Software from dash and search for DOSBOX, then click install.
For other Linux distributions, go to DOSBOX download page.
Setup DOSBOX to run old DOS programs
- After installation is complete, go to Ubuntu dash/search for DOSBOX.
- Click DOSBOX icon to start.
- You should be seeing DOSBOX’s own terminal with a virtual
Now its time to run a dos based application in Ubuntu using DOSBOX. For this tutorial I have used old TURBO C dos based editor which was used to create C and C++ applications.
- Create a directory where we would be mounting the drives.
- Go to your HOME directory (
- Create a directory named “dos” (You can choose any name you want)
- Copy your dos programs – for this example the entire TURBO C files into the new created directory “dos”.
- Go back to your DOSBOX terminal and run below command. This command will mount the “dos” directory contents as virtual drive C:\ in DOSBOX.
mount c /home/your.user.name/dos
- Go to new mounted drive using C:\
- Browse to your application directory executable file (*.exe) and type the same to run. For this example, TURBO C executable resides in TC\BIN\TC.EXE
- You can see your application is running inside the DOSBOX emulator.
- DOSBOX Home Page: home