This guide will not only cover how to install DOSBox for Linux but also how to automatically mount your C: drive. And for the newbies out there scared of DOS commands, it also lays out a recommendation for a classic piece of software to help you along!
Installation of DOSBox for Linux
Installing DOSBox is easy as it’s in the repositories of almost every distribution and should be accessible under any package manager. If you prefer to install by command line: Once installed, the program should be in your system menu or can be started by entering:
Usage of DOSBox for Linux
Once inside DOSBox, it’s easy to feel lost. Rather than launching with a prompt at “C:”, DOSBox starts its prompt at Z: (DOSBox’s internal virtual drive) with a recommendation on how to mount a new C: drive manually. This will scare off new computer users as well as annoy DOS veterans who just want a prompt at C: ready and waiting. To get around this, you need to edit DOSBox’s startup files. On a normal DOS installation this would just involve editing “autoexec.bat” on the root of your C: drive. However, DOSBox uses a local configuration file in a sub-directory of your home folder to organize its commands. To access this file, first enable hidden files and folders in your file manager, then open the “.dosbox” directory in your home folder. This is presuming you have run DOSBox at least once. If not, run it and close it. There should be a file called “dosbox-0.74.conf.” (Your version number may differ.) It’s worth scrolling through this text file to see all the available options for any future tweaking, but for now we’re only interested in the [autoexec] section at the end. As the comments will note, this is for any commands you want running automatically at startup. Any sane person will put their mount commands here. For now this area is blank, but you will enter new lines here in the steps to follow. These steps presume anything you want on your C: drive will be stored in a directory called “dosbox” directly in your home folder. If you don’t already have such a directory, create it now and copy into it any DOS software you want to run. With the DOSBox configuration file, enter these two new lines under the [autoexec] section: Save the file. When you open DOSBox now it will automatically open at C:, ready to access everything in your dosbox folder.
DOS Basics for the Unafraid
Change directory: Go back a directory: Browse a directory and view long file lists page by page: Start an executable program by entering the name of the file; the extension isn’t necessary. For instance, wolf3d.exe just needs:
But I Just Want To Play Games, Not Learn DOS!
Although it’s worth learning some basic DOS commands, it’s not strictly necessary. There was an enormous selection of software designed to create a friendly interface for anyone who didn’t want to learn how to use a DOS terminal. My personal recommendation would be The Norton Commander: an all time classic file manager that popularized twin-pane file browsing. It spawned a countless number of imitation projects, including Midnight Commander on Linux. Use the arrow keys to browse through files, pressing Enter on any file you want to launch or directory you want to enter. To change between the two panes, press Tab. The function keys perform tasks like copying, renaming, deleting, and so on. Sadly, Norton Commander is an abandonware. There is no official link, but you should still be able to find it with Google search. Assuming you have Norton Commander under the “NC” directory in your dosbox folder, you can start it with the commands: Or to be more precise: To make Norton Commander run automatically at startup, you can add this command to the [autoexec] section of the DOSBox config file so that it now looks like this: You should now be able to run DOS games with ease and just copy any new games into your dosbox folder at will. If you would like to know more about DOS commands or where to find software, check out our excellent guide on DOSBox for Mac.