wsl Windows Subsystem for Linux Preview shutdown on opening
Version
Microsoft Windows [version 10.0.22621.674]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.15.68.1
Distro Version
kali-linux (today Ver)
Other Software
<3>WSL (104) ERROR: CreateProcessEntryCommon: 348: getpwuid(1000) failed 2 <3>WSL (104) ERROR: CreateProcessEntryCommon: 352: getpwuid(0) failed 2 <3>WSL (104) ERROR: CreateProcessEntryCommon: 559: execvpe /bin/sh failed 2 <3>WSL (104) ERROR: CreateProcessEntryCommon: 568: Create process not expected to return
Repro Steps
hello so i wanted to install kali-linux, so in the microsoft store i install Windows Subsystem for Linux Preview and i install right after from the microsoft store kali linux
when i tried tu run Kali one windows open and desapear as soon so i tried to ope the Windows Subsystem for Linux Preview from the store and very quick a window open and close with a message i could not read, so i had to film it and make a pause and write it
<3>WSL (104) ERROR: CreateProcessEntryCommon: 348: getpwuid(1000) failed 2 <3>WSL (104) ERROR: CreateProcessEntryCommon: 352: getpwuid(0) failed 2 <3>WSL (104) ERROR: CreateProcessEntryCommon: 559: execvpe /bin/sh failed 2 <3>WSL (104) ERROR: CreateProcessEntryCommon: 568: Create process not expected to return
finally i can't run anything because the windows alway shut down.
What i have done before ? i was on windows 10, i install Windows Subsystem for Linux Preview and kali and run kali whiout problem. i uninstall them, i update windows 10 to 11 and i install Windows Subsystem for Linux Preview and kali, as the documentation said i change wsl1 to wsl2 and i tried to open kali and problem happen
Thanks for reading all of this and english is not my language so sorry for the mystakes.
Expected Behavior

Actual Behavior
done up
Diagnostic Logs
No response
the picture is nt good because the windows shutdown quick, i had to film and to pause -- lecture -- pause --lecture -- pause to see the message
/logs
Hello! Could you please provide more logs to help us better diagnose your issue?
To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The scipt will output the path of the log file once done.
Once completed please upload the output files to this Github issue.
Click here for more info on logging
Thank you!
hello not sure how it works, i execute and here the zip log, but in the power shell it's been written that i have to reproduce the probleme, but it s difficult because it s when i try to open wsl from the microsoft store. maybe there is a command line to open and save a log file in the same time ?
thanks for your answer. WslLogs-2022-10-17_09-51-39.zip
Make sure your distro is set as default. I had some issues where my default distro was assigned to my docker desktop. open your terminal and type "wsl -l -v" to list your distros then something like this:
wsl --setdefault DISTRO-NAME
Not sure if this will fix your problem but its worth a try,
Looks like WSL is configured to launch a user that doesn't exist. I'd suggest running wsl.exe --user root and figuring out what user accounts are actually present in the distro.
Looks like WSL is configured to launch a user that doesn't exist. I'd suggest running
wsl.exe --user rootand figuring out what user accounts are actually present in the distro.
i running wsl.exe --user root and here the answer :
C:\WINDOWS\system32> wsl.exe --user root Processing fstab with mount -a failed.
<3>WSL (8) ERROR: CreateProcessEntryCommon:327: getpwnam(root) failed 2 Utilisateur introuvable. Error code: Wsl/WSL_E_USER_NOT_FOUND PS C:\WINDOWS\system32>
utilisateur introuvable = user unknown
Make sure your distro is set as default. I had some issues where my default distro was assigned to my docker desktop. open your terminal and type "wsl -l -v" to list your distros then something like this:
wsl --setdefault DISTRO-NAME
Not sure if this will fix your problem but its worth a try,
here the answer
C:\WINDOWS\system32> wsl --setdefault kali-linux
L’opération a réussi.
l'operation a reussi = it worked
but still the same problem
Thanks for sharing this @osteopathievilleraymontreal.
I wonder if the issue is that the /etc/passwd is corrupted or missing. Can you share the output of wsl --system -d kali-linux-u root cat /mnt/wslg/distro/etc/passwd ?
C:\WINDOWS\system32> wsl --system -d kali-linux-u root cat /mnt/wslg/distro/etc/passwd Il n’existe aucune distribution avec le nom fourni. Error code: Wsl/Service/WSL_E_DISTRO_NOT_FOUND
Il n’existe aucune distribution avec le nom fourni. = no dristo related to the name given
@osteopathievilleraymontreal Sorry I made a typo.
Can you please share the output of wsl --system -d kali-linux -u root cat /mnt/wslg/distro/etc/passwd instead ?
PS C:\Users\Olys> wsl --system -d kali-linux -u root cat /mnt/wslg/distro/etc/passwd cat: /mnt/wslg/distro/etc/passwd: No such file or directory
thank you for taking your time to answer.
also if there is a way to uninstall properly maybe could be a solution ?
thanks again
Ok that makes sense. It looks like your distribution is corrupted and if /etc/passwd is missing a lot of things won't work.
The easiest way to fix this would be to uninstall and reinstall the distribution. To do this you can use wsl.exe --unregister kali-linux.
If you need to recover files from your distribution before deleting it, you can try \\wsl.localhost, or if that doesn't work, you can mount the distribution vhd in another distribution with wsl --mount
Hi please someone help. I tried installing wsl using the command wsl --install on cmd and i keep getting A system shutdown is in progress. My PC meets the requirement as stated on learn.microsoft. I dont know whats goin on
Windows é um lixo!
The problem is that the only WSL installed is the one provided by Docker. You should instead install Ubuntu or Debian from the Marketplace and then follow there instructions: https://github.com/microsoft/WSL/issues/5923
Im facing this error, after following an online solution to run composer in bash with Windows PHP and composer settings (Changing Distribution WSL version and etc).
But after I change the registry Flags to decimal 15 for : Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss(DistributionUID)\Flags
Problem solved, my Ubuntu running again via WSL
I dont know if you are facing the same problem, but hope it can lead to something with your problem.
Hi you can try command ' wsl -l ' see Windows Subsystem for Linux Distributions defalut setting if docker-desktop-data (Default), you can command ' wsl --setdefault DISTRO-NAME' change defalut setting to wish linux

Ok that makes sense. It looks like your distribution is corrupted and if
/etc/passwdis missing a lot of things won't work.The easiest way to fix this would be to uninstall and reinstall the distribution. To do this you can use
wsl.exe --unregister kali-linux.If you need to recover files from your distribution before deleting it, you can try
\\wsl.localhost, or if that doesn't work, you can mount the distribution vhd in another distribution with wsl --mount
This helped solve my problem thank you so much 🙏🙏