How to open .COM files on Linux

To open .COM files on Linux, linux does not run DOS .COM programs directly; use a DOS emulator (commonly DOSBox is used) to run it when needed.

Step-by-step instructions

  1. Linux does not run DOS .COM programs directly; use a DOS emulator (commonly DOSBox is used) to run it when needed.
  2. To inspect the file without executing it, open it with a hex viewer or use command-line tools to identify it as a binary.

Alternative methods

  • Open .COM in a browser-based viewer if desktop apps fail.
  • Try opening .COM on Linux with a secondary app to rule out app-specific issues.
  • Convert .COM only with trusted tools when direct opening is not possible.

Common issues

The .COM file launches (or tries to) instead of opening in an app

On some systems, .COM is treated as an executable extension, so double-clicking may run it (or attempt to), not display it like a document.

  1. If you intended to inspect it, open it with a hex/binary viewer or a text editor via “Open with…” rather than double-clicking.
  2. If you intended to run a DOS program, run it inside a DOS emulator instead of directly from the desktop.

It will not run on modern Windows/macOS/Linux

.COM programs are designed for DOS/CP/M environments and may not execute correctly (or at all) on modern operating systems without a compatible runtime/emulator.

  1. Use a DOS emulator (commonly DOSBox is used) and run the program from inside the emulated DOS prompt.
  2. If the program depends on DOS hardware behavior, try different emulator settings or an older/compatible DOS environment.

The file opens as gibberish in a text editor

.COM files are binary executables, not text documents, so a text editor will show unreadable characters.

  1. Use a hex/binary viewer for inspection instead of a plain text editor.
  2. If you expected a document, confirm the file was named correctly and wasn’t mislabeled or incorrectly downloaded.

Security warnings or blocked execution

Because .COM is executable code, security tools or OS policies may warn, quarantine, or block it—especially if it came from the internet or email.

  1. Do not bypass warnings unless you trust the source and understand what the program does.
  2. Prefer running it inside an isolated DOS emulator environment rather than executing directly on the host OS.

Security note

.COM files are executable programs; treat unknown .COM files as potentially malicious and avoid running them directly on your main system.

Back to .COM extension page