← 返回命令列表

Linux command

dosbox 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Start DOSBox

dosbox -c "mount c [/path/to/games]"

Run a DOS program directly

dosbox [path/to/program.exe]

Start DOSBox with a specific configuration

dosbox -conf [path/to/dosbox.conf]

Start in fullscreen mode

dosbox -fullscreen

Exit after running a program

dosbox [program.exe] -exit

Start with specific CPU cycles

dosbox -c "cycles [max]"

Mount a CD-ROM image

dosbox -c "imgmount d [path/to/image.iso] -t cdrom"

Run a batch file at startup

dosbox -c "mount c ." -c "c:" -c "[autoexec.bat]"

说明

DOSBox is an emulator that recreates an IBM PC compatible computer with DOS. It allows running classic DOS games and applications on modern operating systems by emulating the x86 CPU, graphics, sound, and input hardware from that era. The emulator provides a command prompt where standard DOS commands work: dir, cd, copy, etc. Host directories are accessed by mounting them as virtual drives. The mount c /path/to/folder command makes a folder appear as drive C: inside DOSBox. Configuration files control emulation settings including CPU speed (cycles), graphics rendering, sound card emulation (Sound Blaster, AdLib, etc.), and memory allocation. The default configuration file is in ~/.dosbox/ on Linux or the user profile on Windows. Key mappings can be customized with the built-in keymapper (Ctrl+F1). Common controls include Alt+Enter for fullscreen toggle, Ctrl+F10 to release mouse capture, and Ctrl+F12/F11 to adjust CPU speed. DOSBox can mount disk images (ISO, CUE/BIN) for games requiring CD-ROMs.

参数

-conf _file_
Load the specified configuration file.
-c _command_
Execute a DOS command after startup. Can be specified multiple times.
-fullscreen
Start in fullscreen mode.
-exit
Exit DOSBox when the program terminates.
-machine _type_
Emulate a specific machine type (hercules, cga, tandy, pcjr, ega, svga_s3).
-noconsole
Start without the console window (Windows only).
-startmapper
Start the keymapper immediately.
-noautoexec
Skip the autoexec section in the config file.
-scaler _scaler_
Use the specified scaler for graphics output.
-forcescaler _scaler_
Force the specified scaler even if not optimal.
-securemode
Run in secure mode, disabling mount and other potentially dangerous commands.
-userconf
Load user configuration file.
-version
Print version information.
-lang _file_
Use the specified language file.
-printconf
Print the location of the default configuration file.
-editconf _program_
Open the configuration file with the specified editor.
-resetconf
Remove the default configuration file.
-resetmapper
Remove the default mapper file.
-opencaptures _program_
Open the captures folder with the specified program.
-socket _n_
Pass a socket number to nullmodem emulation.

FAQ

What is the dosbox command used for?

DOSBox is an emulator that recreates an IBM PC compatible computer with DOS. It allows running classic DOS games and applications on modern operating systems by emulating the x86 CPU, graphics, sound, and input hardware from that era. The emulator provides a command prompt where standard DOS commands work: dir, cd, copy, etc. Host directories are accessed by mounting them as virtual drives. The mount c /path/to/folder command makes a folder appear as drive C: inside DOSBox. Configuration files control emulation settings including CPU speed (cycles), graphics rendering, sound card emulation (Sound Blaster, AdLib, etc.), and memory allocation. The default configuration file is in ~/.dosbox/ on Linux or the user profile on Windows. Key mappings can be customized with the built-in keymapper (Ctrl+F1). Common controls include Alt+Enter for fullscreen toggle, Ctrl+F10 to release mouse capture, and Ctrl+F12/F11 to adjust CPU speed. DOSBox can mount disk images (ISO, CUE/BIN) for games requiring CD-ROMs.

How do I run a basic dosbox example?

Run `dosbox -c "mount c [/path/to/games]"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -conf _file_ do in dosbox?

Load the specified configuration file.