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 DSA, Competitive Programming, JavaScript, System 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 problems, interview experiences, and interview bundles.
We wish you Good Luck!
Happy Learning!