[process exited with code 1 (0x00000001)] You can now close this terminal with Ctrl+D, or press Enter to restart. #20876

Closed
opened 2026-01-31 07:26:33 +00:00 by claunia · 2 comments
Owner

Originally created by @AllensonAzure on GitHub (Nov 23, 2023).

Permanent issue. No amount of googling is resolving my issue.
Very frustrating.

Originally created by @AllensonAzure on GitHub (Nov 23, 2023). Permanent issue. No amount of googling is resolving my issue. Very frustrating.
claunia added the Issue-QuestionNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-31 07:26:34 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 27, 2023):

Why am I seeing [process exited with code ...]?

The root cause is probably directly related to whatever application you're running in the Terminal. I'd guess that you're hitting a WSL bug, just from these search results:
image

The first one being: https://github.com/microsoft/WSL/issues/4899

@zadjii-msft commented on GitHub (Nov 27, 2023): [Why am I seeing `[process exited with code ...]`?](https://github.com/microsoft/terminal/wiki/Frequently-Asked-Questions-(FAQ)#why-am-i-seeing-process-exited-with-code-) The root cause is probably directly related to whatever application you're running in the Terminal. I'd guess that you're hitting a WSL bug, just from these search results: ![image](https://github.com/microsoft/terminal/assets/18356694/efadc3c1-c04d-4624-b4bc-2c5481054617) The first one being: https://github.com/microsoft/WSL/issues/4899
Author
Owner

@Maka-77x commented on GitHub (Apr 17, 2024):

I resolved it by running the following command (in powershell, as admin):
wsl --update --web-download

The regular wsl --update wasn't working (Timing out).

Things that should be checked/enabled:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart (as admin in Powershell)
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart (as admin in Powershell)
Ensuring hyper-V was enabled and set in BIOS - also in additional features (above command should do it)

Things that might have helped:

adding C:/Windows/System32 to environment variables

adding "commandline": "wsl -d distroname" in
%localappdata%\Packages\Microsoft.Windos.Terminal._……\LocalState\settings.json
(This seems to be for running a command upon opening terminal/powershell/whatever shell profile and booting into the specified distro)

Also tried, but didn't seem to help:
netsh winsock reset (as admin in Powershell)

wsl --setdefault distro-name

wsl --unregister distro-name
then re-adding it
wsl --import distro-name $env:USERPROFILE\location\for-distro-name\ $env:USERPROFILE\Downloads\distro-name.tar.gz

@Maka-77x commented on GitHub (Apr 17, 2024): I resolved it by running the following command (in powershell, as admin): `wsl --update --web-download` The regular wsl --update wasn't working (Timing out). Things that should be checked/enabled: `dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart` (as admin in Powershell) `dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart` (as admin in Powershell) Ensuring hyper-V was enabled and set in BIOS - also in additional features (above command should do it) Things that _might_ have helped: adding `C:/Windows/System32` to environment variables adding `"commandline": "wsl -d distroname"` in `%localappdata%\Packages\Microsoft.Windos.Terminal._……\LocalState\settings.json` (This seems to be for running a command upon opening terminal/powershell/whatever shell profile and booting into the specified distro) Also tried, but didn't seem to help: `netsh winsock reset` (as admin in Powershell) `wsl --setdefault distro-name` `wsl --unregister distro-name` then re-adding it `wsl --import distro-name $env:USERPROFILE\location\for-distro-name\ $env:USERPROFILE\Downloads\distro-name.tar.gz`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20876