Initially posted to the Unix \ linux stack exchange and was pointed here instead.

I recently updated Windows Terminal from 1.2.X to 1.12.X and the Ubuntu install refuses to run, giving the error [process exited with code 4294967295 (0xffffffff)]. The older Ubuntu-18.04 runs fine however.

Entry in settings

        "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
        "hidden": false,
        "name": "Ubuntu",
        "source": "Windows.Terminal.Wsl"

Any ideas on this one?

Command line options tried

  • C:\WINDOWS\system32\wsl.exe -d Ubuntu
  • C:\Windows\system32\wsl.exe -d Ubuntu
  • wsl.exe -d Ubuntu <- this copied from wsl.exe -d Ubuntu-18.04

Background - Windows Terminal & Foreground - Ubuntu terminal

  • What is the connection between Windows Terminal and WSL?
    – harrymc
    Feb 25, 2022 at 10:58
  • @harrymc it's because I'm running the WSL Ubuntu terminal through Windows Terminal. If I run the independent Ubuntu terminal, it works. Feb 25, 2022 at 11:28
  • @AlistairHardy - Can you provide the relevant information from your profile json for Windows Terminal?
    – Ramhound
    Feb 25, 2022 at 13:22

8 Answers 8


This problem is detailed in the bug-report
Unable to launch WSL Ubuntu - The system cannot find the file specified. #12474.

The workaround there was to change the commandline to:

<path_to>/wsl.exe ~ -d Ubuntu.<Version>
  • No joy for me I'm afraid Feb 25, 2022 at 14:28
  • 2
    Another workaround in this post was to change the starting directory to %USERPROFILE% or something near.
    – harrymc
    Feb 25, 2022 at 14:31
  • 1
    %USERPROFILE% worked! Feb 28, 2022 at 15:18
  • 1
    @AlistairHardy Great to hear that worked. I'm curious, though, since I think that would mean that Windows Terminal is setting the default path to something that WSL can't handle. When you start Command Prompt or PowerShell from Windows Terminal, what directory do they start in? Feb 28, 2022 at 18:45
  • CMD & Powershell start in c:\Users\USERNAME & Ubuntu is starting in /mnt/c/Users/USERNAME Mar 3, 2022 at 10:18
  1. Click on arrow down on upper tab bar

  2. Select Ubuntu Profile on left menu

  3. Find Starting Directory option

  4. Overwrite to %USERPROFILE%

  5. Save

Annotated screenshot of Settings dialog, showing steps

  • Thanks for editing I wasn't able to put the image directly Jul 11, 2022 at 20:19

So in my case

  1. Open PowerShell terminal
  2. Stop the virtual machine by executing the following command in PowerShell:
wsl --shutdown
  1. Reopen Ubuntu terminal and it ran smoothly.

I hope it will help some of you!


Some things to try:

  • First, delete the existing Ubuntu profile (back up settings.json if you want), exit Windows Terminal, and restart. Windows Terminal should detect the Ubuntu installation and recreate the profile automatically. See if the newly autogenerated one works.

If it doesn't:

  • Start PowerShell and try from there:

    wsl -l -v # Sanity check the installations themselves
    wsl ~ -d Ubuntu
    wsl ~ -u root -d Ubuntu
    wsl ~ -d Ubuntu -e bash --noprofile --norc

    Does wsl -l -v show the correct profile? If so, do any of the other commands work? If the wsl ~ -d Ubuntu doesn't work but the other two do, then it's likely something in your bash startup config that is causing the issue.

If none of that helps:

  • Was there any /etc/wsl.conf file in the Ubuntu instance? Did it have a Command= line by any chance that could be failing?
  • wsl.conf only has generateResolvConf = false in it. Tried editing the settings.json as you said and that's had no luck. The wsl commands all worked as expected. Feb 28, 2022 at 15:15
  • Thank you I tried everything else and the only thing that worked for me was adding -e bash, I have no idea why it's needed (shouldn't be), but ever since adding that it started working
    – neokyle
    Apr 3 at 1:01
  • @neokyle Glad to hear that it helped. Was it the -e bash alone that worked or the --noprofile --norc as well? If the former, then it sounds like the user shell may be changed. If the later, then there's something wrong in the startup files. Either way, we can troubleshoot from there. Apr 4 at 1:56
  • -e bash was all I needed to add, the weird thing is sudo cat /etc/passwd | grep $USER suggests that my shell was configured to use /bin/bash, and I don't recall changing it. Only thing I can think of is that maybe WSL has some other location to determine shell. The only other customization I have is /etc/wsl.conf sets systemd=true
    – neokyle
    Apr 4 at 15:44

I had the same issue for me changing the executable path worked. see this image


C:\Windows\System32\wsl.exe -d Ubuntu-20.04


C:\Windows\System32\cmd.exe /C wsl.exe -d Ubuntu-20.04

  • How is this different from accepted answer?
    – Toto
    Jun 18, 2022 at 8:44
  • accepted answer didn't work for me Jun 24, 2022 at 5:04
  • this worked for me!!!!! Mar 3 at 12:47

I had the same issue today and found that the drive letter of my disk had changed (to E:). Reverting it back (to D:) and rebooting helped resolve this wsl issue.


similar issue:

  1. ubuntu run istelf fine.
  2. ubuntu dont run from "windows terminal" // error: [process exited with code 4294967295 (0xffffffff)]


  1. open terminal
  2. terminal setting
  3. select ubuntu profile.
  4. Right hand pane hange command line executable path to folowing C:\Windows\System32\wsl.exe ~ -d Ubuntu or C:\WINDOWS\system32\wsl.exe ~ -d Ubuntu.
  5. save profile, run again.

This worked for me:

wsl --shutdown

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.