Skip to content

error running windows EXEs "exec format error" (solved by restarting computer) #13872

@Thak676

Description

@Thak676

WslLogs-2025-12-10_12-11-37.zip

Windows Version

Microsoft Windows [Version 10.0.26200.7462]

WSL Version

WSL version: 2.6.2.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2-1

Distro Version

Ubuntu 24.04

Other Software

(See solution below)

I had this error when running commands such as explorer.exe from wsl:

-bash: cannot execute binary file: Exec format error

Even after finding the location of the exe on the system and running it, I still get this error:
-bash: /mnt/c/windows/explorer.exe: cannot execute binary file: Exec format error

Note that this was after doing a fresh install of wsl (ubuntu). I reasoned that perhaps some permissions hadn't been granted to wsl yet.

*** SOLUTION ***
THIS WAS SOLVED BY RESTARTING THE COMPUTER. I am writing this bug report because all attempts at googling for the solution did not suggest this solution, which did indeed solve the problem for me.

NOTE1 TO MICROSOFT TECHNICIANS:
After submitting this bug report, github-actions put a comment saying:
Logs are required for review from WSL team
Thus I have added logs, but they are not logs of me reproducing the problem as I have no idea if it is necessary that it be a fresh install of windows or the 1st installation of wsl, and I am not going through the trouble of installing another version of wsl to check. I'm already "trying to do the right thing" by issuing this report and I am only going to jump through so many hoops. This is also here to hopefully aid people who are googling looking for a solution.

NOTE2 TO MICROSOFT TECHNICIANS:
There is a minor problem in this bug reporting form. At one point it says:
Tell us whether the issue is on WSL 2 and/or WSL 1. You can tell by running wsl -l -v.
This should read:
Tell us whether the issue is on WSL 2 and/or WSL 1. You can tell by running wsl.exe -l -v.

Repro Steps

On a fresh install of windows, install wsl ubuntu 24.04 and then attempt to run:
$ explorer.exe .

Expected Behavior

I expected the File Explorer to be opened

Actual Behavior

-bash: /mnt/c/windows/explorer.exe: cannot execute binary file: Exec format error

Diagnostic Logs

See attach zip file

WslLogs-2025-12-10_12-11-37.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions