WSL: WSL2-Ubuntu [process exited with code 1] under updating 19564.1005
As the title. I updated the insider version to 19564.1005. WSL2-Ubuntu cannot start. I got [process exited with code 1] error with Terminal-run.

About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 8
- Comments: 69 (3 by maintainers)
I also have this issue, but by trying “netsh winsock reset” under admin, it solved the problem.
Thanks @benhillis. For other non linux users like me, uninstalling zsh with apt-get doesn’t reset the shell to bash, but since we already lost access to either shell, it is necessary to first get a new shell with that wsl --user root, and then run chsh -s /bin/bash [theUsernameOfYourUser] , then its all good again.
Mine too. I installed an then uninstalled zsh. And am stuck with [process exited with code 1] message now. Wsl shutdown and winsock reset do not work 😕
Hi, I was getting the same error but in VSCode integrated terminal. This is how I solved it. Check the default WSL distribution with
wsl -l --all. I haddocker-desktopset as the default distribution. Change the distribution to Ubuntu withwsl --setdefault Ubuntu. HTH.Same here, my brain farted and I removed zsh without thinking too much. Now either I manage to enter as root in that WSL Distro or I think I’ve got to rebuild it completely.
EDIT: nvm, I managed to solve the issue by using
wsl --user rootand fixing zsh from there.It seems very random as to whether it starts the instance, or fails to connect/start it still. I’m still alternating between both “The Windows Subsystem for Linux Instance has terminated.” and the original connection error when attempting to launch a new session after running
wsl --shutdownIn my case, it’s the fish shell was removed in unknown reason after I installed Docker Desktop. Just open a PowerShell and run
you can go into bash shell, then reinstall the missing fish
that solved the problem.
Hello everyone! I had this issue running chsh to change my default shell and provided a shell that didn’t exist, e.g.
/usr/bin/bashwhen it should’ve been/bin/bashAny attempts to modify chsh would ask for a password and I could not access the WSL terminal in vscode or any other method.To resolve this, you need to execute commands directly from the CMD. For example this command
wsl.exe -e chsh -s /bin/bashThisexecutesthe linux commandchshand changes theshellto/bin/bashNow if it asks you for a password and says
PAM: Authentication failurethis is because the root user doesn’t have a valid profile under passwd config to execute this command. We can temporarily disable this by accessing your WSL folder directory, mine is under\\wsl$\Ubuntu-18.04\etc\pam.dwhich you can type into explorer if your ubuntu instance is running. Edit the chsh file to changeauth required pam_shells.sotoauth sufficient pam_shells.soand save the file.You should now be able to run the wsl.exe command in CMD without a password prompt. I recommend you revert the chsh file back to required after making your change.
I removed zsh from wsl distro then I got the error [process exited with code 1] , I managed to solve this by logging in to wsl using
wsl --user root -d [distro name]then running commandchsh --shell /bin/bash [username]fixed the issue.However, everytime when I reboot my computer, this problem appears again. 😢
The Error Cause
The error is the result of lauching
docker-desktopwhen it is set as your default WSL distribution.Solution 1
As @rahulrai-in pointed out, you can simply set a default distro.
Solution 2
Also, if you have multiple profiles in your windows terminal, you have to provide a start-up command for each terminal profile.
Example
This settings.json is not complete but should provide necessary information to update your win-term-settings.
%localappdata%\Packages\Microsoft.Windos.Terminal._………………\LocalState\settings.json->open your terminal as administrator and type: wsl -u root
and then execute this command: chsh -s /bin/bash your-ubuntu-username
restart terminal.
I wished I read this earlier. I ultimately did the same thing, but logged in as root from PowerShell
wsl -d <distro> --user root. From there, switched user and ran the command to run the default shell:su <normalUser> -s /usr/bin/bash. Then reinstalled zsh and changed the shell back to zsh:sudo apt install zsh -y && chsh -s /usr/bin/zsh. The reason why I posted this is in case anyone else may need a reason to access the shell from within WSL as root and change the necessary configs.Open PowerShell then type
wsl -e bashto use the bash shell, then replace the default shell using bash by typingchsh -s /bin/bash@edmael Can you elaborate or share a link on “fixing zsh from there”?, The reason I’m stuck here is because of uninstalling zsh … Thanks
This is severe enough, hitting so many users, I don’t understand why dev / microsoft is not looking into it with high urgency.
If you came to the conclusion that you need to renistall the ubuntu, instead, Reset the app in the Add or removes program.
this command worked for me.thanks
The only thing that helped me was reinstall the shell (uninstall under windows and install again)
It seems like some customizations may possibly breaks wsl. It is important than that it will be properly documented.
In my case however, I did have a fresh install of Ubuntu-20.04 , after upgrading to wsl v2. But that does not work as it hits this issue. I have not customized anything special other than terminal colors, prompt and path. If this breaks wsl, something is really broken.
I gave up on v2. I’ve converted my distos back to v1, and I am back in business.
@thisisbenmanley from what you mentioned, it seems like your WSL2 is borked. I hope reinstalling WSL2 solves your problem.
Still getting [process exited with code 1]. Guest: Ubuntu 18.04 Host: Windows version 2004, build 19041.329 WSL1 was working great forever, converted to WSL2 and got numerous errors but eventually only this one.
netsh winsock resetand any amount of restarting never worked for me. Tried converting back to WSL1, still the same error. Going to do a full reinstall of Ubuntu starting in WSL2 because other threads have mentioned that working.It works! Thanks!