Where Does DOSBox-X Install the Configuration File in Linux?

If you've just installed DOSBox-X on a Linux system and you're hunting for the configuration file, you're not alone. Unlike many applications that drop a single config file in an obvious location, DOSBox-X follows Linux filesystem conventions — which means the file's location depends on how you installed it, which user is running it, and whether the file has been generated yet at all.

What the DOSBox-X Configuration File Actually Does

The DOSBox-X configuration file — typically named dosbox-x.conf — controls nearly everything about how the emulator behaves. This includes CPU cycles, memory allocation, graphics output, sound card emulation, mounted drive paths, and dozens of other settings. Think of it as the control panel for the entire emulator environment.

When DOSBox-X launches, it reads this file to set up the emulated DOS environment before you see the DOS prompt. If no configuration file exists, DOSBox-X falls back to built-in defaults, which is functional but not tailored to your system.

The Default Location: ~/.config/dosbox-x/

For most Linux installations — whether you installed DOSBox-X via a package manager, Flatpak, or a pre-built binary — the configuration file is placed inside your user's home directory, following the XDG Base Directory Specification.

The standard path is:

~/.config/dosbox-x/dosbox-x.conf 

Breaking that down:

  • ~ refers to your home directory (e.g., /home/yourusername)
  • .config is the hidden XDG config folder most modern Linux applications use
  • dosbox-x is the application-specific subdirectory
  • dosbox-x.conf is the configuration file itself

This file is user-specific, meaning each Linux user account on the same machine can have their own independent DOSBox-X configuration.

When the File Doesn't Exist Yet 📁

DOSBox-X doesn't always create the configuration file automatically on first launch. In some cases, you need to generate it yourself. You can do this by running:

dosbox-x -printconf 

This command prints the path where DOSBox-X expects to find (or will create) the configuration file. To actually write a default configuration file to disk, use:

dosbox-x -resetconf 

This generates a fresh dosbox-x.conf file with all default values commented and explained inline, which makes it a useful starting point for customization.

How Installation Method Changes the File Location

Not all DOSBox-X installations behave identically on Linux. The installation method is one of the biggest variables affecting where the config file ends up.

Installation MethodLikely Config File Location
Package manager (apt, dnf, pacman)~/.config/dosbox-x/dosbox-x.conf
Flatpak~/.var/app/com.dosbox_x.DOSBox-X/config/dosbox-x/dosbox-x.conf
AppImage (self-contained)~/.config/dosbox-x/dosbox-x.conf (usually)
Compiled from source~/.config/dosbox-x/dosbox-x.conf (depends on build flags)
SnapMay use a sandboxed path within ~/snap/

Flatpak installations are the most common source of confusion. Because Flatpak sandboxes applications, the config directory lives inside a Flatpak-specific hidden folder rather than the standard .config path. If you're using Flatpak and editing ~/.config/dosbox-x/dosbox-x.conf and seeing no effect, this is likely why.

Checking the Active Configuration Path at Runtime 🔍

Rather than guessing, you can always ask DOSBox-X directly which configuration file it's loading. The -printconf flag mentioned above outputs the path to your terminal without launching the emulator. This is the most reliable method regardless of installation type or Linux distribution.

You can also launch DOSBox-X with a specific configuration file using:

dosbox-x -conf /path/to/your/custom.conf 

This is useful if you maintain multiple DOSBox-X setups — one for gaming, one for productivity software, one for a specific DOS application — each with its own config file stored wherever makes sense for your workflow.

System-Wide vs. User-Level Configuration

Some Linux setups — particularly multi-user servers or tightly managed desktops — may have a system-wide DOSBox-X configuration file. This is less common for DOSBox-X specifically, but the convention exists. System-level configs typically live somewhere under /etc/, though DOSBox-X doesn't officially enforce a system-wide path the way some daemons do.

In practice, for most desktop Linux users, the user-level config in ~/.config/dosbox-x/ is the only one that matters, and it takes precedence over any fallback defaults.

Factors That Affect Where Your Config File Lives

To summarize the key variables at play:

  • Installation method — Flatpak, native package, AppImage, and source builds each have different behavior
  • Linux distribution — Some distros patch or configure DOSBox-X differently than the upstream project
  • XDG environment variables — If your system has a custom $XDG_CONFIG_HOME variable set, DOSBox-X will respect that, shifting the config path accordingly
  • Whether the file has been generated — A missing config file doesn't mean DOSBox-X is broken; it may just be running on defaults

The $XDG_CONFIG_HOME variable in particular is worth checking if you use a customized Linux desktop environment. Running echo $XDG_CONFIG_HOME in a terminal tells you whether a non-standard config root is in use — which would shift the entire expected path.

Where your config file actually lives, and which one DOSBox-X is actively reading, comes down to the specific combination of your installation method, your Linux environment, and how your user session is configured.