WSL Terminals Won’t Start in VSCode version 1.101 – “C:\WINDOWS\System32\bash.exe ‘-d’, ‘Debian’” terminated with exit code: 2

After updating VSCode to May 2025 (v1.101) on Windows, I found that any WSL terminals failed to open. Somehow VSCode was now trying to use “C:\WINDOWS\System32\bash.exe” to run the WSL terminals which was resulting in the following errors:

The terminal process "C:\WINDOWS\System32\bash.exe '-d', 'Debian'" terminated with exit code: 2.
The terminal process "C:\WINDOWS\System32\bash.exe '-d', 'Ubuntu'" terminated with exit code: 2.

The solution is to update the VSCode settings to use the correct WSL executable. The settings are located in the `settings.json` file at C:\Users\<YourUsername>\AppData\Roaming\Code\User\settings.json.

Look for “terminal.integrated.profiles.windows” and if it doesn’t exist, you can add it. If it does exist, ensure that the WSL profile is set to use `wsl.exe` instead of `bash.exe`. Here is the code snippet you need to add or modify in your `settings.json` file:

"terminal.integrated.profiles.windows": {
    "Debian": {
        "path": "C:\\Windows\\System32\\wsl.exe",
        "args": ["-d", "Debian"]
    },
    "Ubuntu": {
        "path": "C:\\Windows\\System32\\wsl.exe",
        "args": ["-d", "Ubuntu"]
    },
},

This change will ensure that VSCode uses the correct WSL executable for terminal sessions.

, , ,

Leave a Reply

Your email address will not be published. Required fields are marked *