DOSBox-X puts its main configuration file in your home directory
When you install DOSBox-X on Linux, the program creates a configuration file called dosbox-x.conf in your home directory — the folder that opens when you type cd ~ in the terminal. This is the file that controls how DOSBox-X behaves: which CPU speed it uses, how much memory it allocates, what sound card it emulates, and dozens of other settings. You do not need to create this file yourself; DOSBox-X generates it automatically the first time you run the program.
The exact path is ~/.dosbox-x/dosbox-x.conf or /home/yourusername/.dosbox-x/dosbox-x.conf. The dot at the start of .dosbox-x means it is a hidden folder — your file manager will not show it unless you turn on the view for hidden files. This is standard practice on Linux; programs store their settings in hidden folders to keep your home directory from looking cluttered.
Key Takeaways
- DOSBox-X stores its main configuration file at ~/.dosbox-x/dosbox-x.conf, which is a hidden folder in your home directory.
- The file is created automatically when you first run DOSBox-X, so you do not need to build it from scratch.
- You can view and edit this file with any text editor, such as gedit, nano, or VS Code.
- Hidden files and folders (those starting with a dot) are invisible by default in your file manager; enable the hidden files view to see them.
- If you delete the configuration file, DOSBox-X will regenerate it with default settings the next time you launch the program.
How to find the configuration file in your file manager
Open your file manager and navigate to your home directory. In most Linux desktop environments, this is the default location when you open the file manager, or you can click the home icon in the sidebar. Once you are there, look for a menu option to show hidden files. In GNOME Files (the default on Ubuntu and Fedora), press Ctrl+H. In Dolphin (the default on KDE), go to the View menu and check "Show Hidden Files". In Thunar (the default on Xfce), go to View and select "Show Hidden Files".
After you enable hidden files, you will see a folder named .dosbox-x. Open it, and inside you will find dosbox-x.conf. This is the file you need if you want to change how DOSBox-X runs — for example, to increase the CPU cycles, change the sound output, or mount a different folder as your C: drive.
How to find the configuration file from the terminal
If you prefer the command line, open a terminal and type ls -la ~/.dosbox-x/. This lists all files in the DOSBox-X folder, including hidden ones. You will see dosbox-x.conf in the output. To view the contents of the file, type cat ~/.dosbox-x/dosbox-x.conf. To edit it with the nano text editor, type nano ~/.dosbox-x/dosbox-x.conf.
The terminal approach is faster if you know what you are looking for and do not want to click through menus. It also works over a remote connection if you are managing a Linux machine from another computer.
What the configuration file controls
The dosbox-x.conf file is a plain text file divided into sections, each marked with a label in square brackets — for example, [cpu], [mixer], [render], and [dos]. Under each section are settings you can change. The [cpu] section controls processor speed and type. The [mixer] section controls sound output. The [render] section controls how the display is drawn. The [dos] section controls things like the default drive and the amount of conventional memory.
When you first run DOSBox-X, it generates this file with sensible defaults for most users. You can edit any setting in the file with a text editor, save it, and the changes will take effect the next time you launch DOSBox-X. If you make a mistake and the program will not start, you can delete the file and DOSBox-X will create a fresh one with defaults.
Why DOSBox-X uses a hidden folder
Linux programs store configuration files in hidden folders (those starting with a dot) to follow a standard called the XDG Base Directory specification. This keeps your home directory organized: all the settings for all your programs live in hidden folders, while your actual files — documents, photos, downloads — stay visible and straightforward to find. If every program created a visible folder in your home directory, the list would become overwhelming.
The hidden folder approach also makes it clear that these are system files you usually do not need to touch. Most users never open their configuration files. But when you do need to change how a program behaves, the file is there, in a predictable location, waiting for you to edit it.
How to back up your configuration before making changes
Before you edit dosbox-x.conf, make a copy of it so you can restore the original if something goes wrong. In your file manager, right-click the dosbox-x.conf file and select "Copy". Then right-click in the same folder and select "Paste". Rename the copy to something like dosbox-x.conf.backup. Now if you break something, you can delete the broken file and rename the backup back to dosbox-x.conf.
From the terminal, the same task takes one command: cp ~/.dosbox-x/dosbox-x.conf ~/.dosbox-x/dosbox-x.conf.backup. This creates an exact copy with the word "backup" added to the filename. Keep this copy in the same folder so you know where to find it.
What to do if the configuration file is missing or corrupted
If you cannot find the .dosbox-x folder, or if the dosbox-x.conf file is missing or will not open, the simplest fix is to delete the entire .dosbox-x folder and let DOSBox-X recreate it. Open your file manager, navigate to your home directory, enable hidden files, right-click the .dosbox-x folder, and select "Delete". Then launch DOSBox-X. The program will detect that the folder is gone and generate a new one with a fresh dosbox-x.conf file containing all the default settings.
If you have customized your configuration and want to keep those changes, do not delete the folder. Instead, open dosbox-x.conf in a text editor and look for syntax errors — missing brackets, typos in setting names, or values that do not match what the program expects. The DOSBox-X documentation lists all valid settings and their allowed values. Fixing the error and saving the file usually resolves the problem.
Frequently Asked Questions
Can I have more than one configuration file?
Yes. You can create multiple .conf files in the .dosbox-x folder and launch DOSBox-X with a specific one using the command line. For example, dosbox-x -conf ~/.dosbox-x/gaming.conf starts DOSBox-X with the gaming.conf file instead of the default dosbox-x.conf. This is useful if you have different games that need different settings.
What text editor should I use to edit the configuration file?
Any plain text editor works: gedit, nano, vim, VS Code, or even cat with redirection. Avoid word processors like LibreOffice Writer because they add formatting that breaks the file. If you are new to Linux, gedit is the easiest choice — it is a straightforward graphical editor with no learning curve.
Does DOSBox-X overwrite my configuration file when I update it?
No. DOSBox-X only creates the configuration file if it does not exist. When you update DOSBox-X, your existing dosbox-x.conf file stays unchanged. However, new versions of DOSBox-X may add new settings to the default configuration. If you want to see what new options are available, you can temporarily rename your current file, let DOSBox-X generate a new default one, and then compare the two.
Where do individual game configurations go?
If you create separate .conf files for specific games, keep them in the .dosbox-x folder alongside dosbox-x.conf. You can organize them in subfolders if you have many games — for example, ~/.dosbox-x/games/doom.conf or ~/.dosbox-x/games/sierra/kings-quest.conf. Launch each one from the command line with the -conf flag to use the game-specific settings.
Can I edit the configuration file while DOSBox-X is running?
You can edit the file, but DOSBox-X will not read the changes until you close and relaunch the program. If you change a setting while DOSBox-X is open, save the file, and then restart DOSBox-X, the new setting will take effect. This is why it is a good idea to close the program before making configuration changes.