Table of contents
1.
Introduction
2.
What is DOSBox?
3.
Key Features of DOSBox
4.
DOSBox Installation on Linux
5.
Using DOSBox on Linux
6.
How to run MS-DOS Games and Programs?
7.
Frequently Asked Questions
7.1.
Are there any keyboard shortcuts or commands one should know when using DOSBox?
7.2.
Can one use DOSBox to run Windows programs?
7.3.
Can one use game controllers or joysticks with DOSBox on Linux?
8.
Conclusion
Last Updated: Mar 27, 2024
Easy

DOSBox – Runs Old MS-DOS Games_Programs in Linux

Author Ayush Mishra
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Running outdated MS-DOS applications and games on Linux can be a pleasant experience. With the help of the powerful emulator DOSBox, Linux users may simply emulate a DOS environment to run old games or programs.

In this blog we will discuss DOSBox – Runs Old MS-DOS Games_Programs in Linux in deep detail. Let’s start going!

What is DOSBox?

DOSBox is an open-source emulator that enables users to use MS-DOS (Microsoft Disc Operating System) software on current operating systems like Linux. Microsoft developed this operating system widely used in the 1980s and 1990s. 

It offered a command-line interface for using the computer and running various programs, such as productivity software, games, and more. Users may play games and use apps created due to the environment it provides, which emulates the hardware and software of an old DOS PC.

Also see, Parallel Operating System

Key Features of DOSBox

The key features of DOSBox are:-

  • Emulated Hardware: DOSBox imitates the CPU, memory, graphics, sound, and input devices of an old DOS computer. 
     
  • Command Line Interface: Like the original MS-DOS, DOSBox also has a command-line interface to navigate directories, run programs, and carry out various tasks. 
     
  • Compatibility: DOSBox aims to be compatible with a wide variety of old DOS software, making it possible to run many vintage games and applications.
     
  • Customizable Configuration: To enhance performance and program compatibility, you can change several settings in the DOSBox configuration file.
     
  • Graphical and Sound Support: DOSBox offers sound emulation and supports a variety of graphical modes, enabling you to play classic games and run programs the way they were meant to be played.
     
  • Cross-Platform: DOSBox runs on many operating systems, including Windows, macOS, and Linux. It is adaptable and available to various people.

DOSBox Installation on Linux

Installing DOSBox on your Linux PC is necessary before you can use your old MS-DOS games and applications. The software repository for your distribution is typically where you may obtain DOSBox. To install on Ubuntu or Linux Mint, use the following commands in a terminal once it is open:

sudo apt-get install dosbox


If you already have DOSBox installed in your system, you can run the following commands to update it.

sudo apt-get update


To install on another Linux operating system, such as RHEL, CentOS, or Fedora, download the source from the below-provided link and install it on the system.

https://nchc.dl.sourceforge.net/project/dosbox/dosbox/0.74-3/dosbox-0.74-3.tar.gz


Run the commands below to install the file by navigating to the location where it was downloaded.

# tar zxf dosbox-0.74-3.tar.gz
# cd dosbox-0.74-3/
# ./configure
# make
# make install

Using DOSBox on Linux

The following command can launch DOSBox from a terminal, opening a window with a Z:\ prompt.

$ dosbox


Once DOSBox is running, you must first mount the system component that DOSBox needs to access by following the below command. 

mount <label> <path-to-mount>

 

Run the command below to mount the whole Home directory as C.

mount C~


Suppose we're mounting a directory at "/path/to/directory" as DOSBox's "C:" drive. Using the "cd" command, you can access the directory once it has been mounted.

cd C:\directory


From above, MS-DOS programs can be run just like they would on a genuine MS-DOS system. For example, you may use the following command to launch the MS-DOS game "Doom":

doom.exe

How to run MS-DOS Games and Programs?

Running an MS-DOS game and program using DOSBox is a simple process. Here are a steps to run an MS-DOS game or program:

Step 1: Find the game: Locate the MS-DOS game and program executable file you want to launch (it usually has a ".exe" extension). Ensure you know the directory path where the game or program file is stored.

Step 2: Launch DOSBox: To start the DOSBox emulator, open a terminal and enter the command DOSBox.

Step 3: Mount the Directory: To allow DOSBox access to the directory holding the game or program executable, you must "mount" it in the DOSBox environment. Assume that your game is located in your home directory, in a " games " directory. You would mount it as follows in DOSBox:

mount C ~/games


Replace ~/games with the directory path for your game.

Step 4: Goto the C: Drive: After mounting the directory, go to the "C:" drive in DOSBox as follows:

C:

 

Step 5: Open the game directory: The executable's location can be found by changing the directory to that folder. If your game is in a folder called "doom," for instance, type:

cd doom

 

Step 6: Run the Game: Enter the game's name and press Enter to launch the executable. For instance, if the executable for your game is called "game.exe," type:

game.exe

 

Step 7: Play the game: The DOSBox environment should begin executing the game. Play the game using the keyboard controls as directed by the software.

Step 8: Exiting the Game: You might need to press a particular combination of keys or adhere to in-game instructions to leave the game and return to the DOSBox command line. If that's impossible, you can frequently switch between windowed full-screen mode by pressing Alt + Enter. The Ctrl + F9 key combination can be used to terminate DOSBox altogether.

Frequently Asked Questions

Are there any keyboard shortcuts or commands one should know when using DOSBox?

Yes, DOSBox features unique keyboard shortcuts and commands for operations like taking screenshots, switching between full-screen and windowed modes and quitting the emulator. 

Can one use DOSBox to run Windows programs?

MS-DOS software and games are intended for DOSBox. It might not always be practical or straightforward to run Windows programs. If you want to run Windows applications on Linux, consider using Wine as a Windows emulator.

Can one use game controllers or joysticks with DOSBox on Linux?

Yes, DOSBox supports game controllers and joysticks. You may need to configure them in the DOSBox configuration file (dosbox.conf) to map joystick buttons and axes to DOS game controls.

Conclusion

Running outdated MS-DOS games and programs on current Linux PCs is made possible by the flexible and useful DOSBox software. Bridging the past and present gap enables users to relive nostalgia and use classic computer programs. 

We hope this blog has helped you to gain knowledge of DOSBox. Do not stop learning! We recommend you read some of our related articles to DOSBox: 

 

Refer to our Guided Path to upskill yourself in DSACompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your competency in coding, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio!

But suppose you have just started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. For placement preparations, you must look at the problemsinterview experiences, and interview bundles.

We wish you Good Luck! 

Happy Learning!

Live masterclass