DEV Community

0xkoji
0xkoji

Posted on

1

WSL Troubleshooting Guide When You Can Not Access to WSL2 From Terminal

Here is a troubleshooting guide for when you suddenly become unable to access WSL.
This issue often occurs when using Docker Desktop in combination with WSL.

Problem: WSL Fails to Start

When attempting to run WSL, the following error appears:

[process exited with code 4294967295 (0xffffffff)]
You can now close this terminal with Ctrl+D, or press Enter to restart.
The Windows Subsystem for Linux instance has terminated.
Error code: Wsl/Service/0x80072745

[process exited with code 4294967295 (0xffffffff)]
You can now close this terminal with Ctrl+D, or press Enter to restart.
Enter fullscreen mode Exit fullscreen mode

Diagnosis Steps

  1. Check WSL status:
   wsl --status
Enter fullscreen mode Exit fullscreen mode
  1. Shut down all WSL instances:
   wsl --shutdown
Enter fullscreen mode Exit fullscreen mode
  1. List installed WSL distributions and their states:
   wsl -l -v
Enter fullscreen mode Exit fullscreen mode
  1. Terminate specific distributions if needed:
   wsl --terminate Ubuntu-24.04
Enter fullscreen mode Exit fullscreen mode
  1. Check the WSL service status:
   Get-Service LxssManager | Select-Object Name, Status, StartType
Enter fullscreen mode Exit fullscreen mode

ℹ️ If this service is not found, it indicates WSL components aren't correctly installed.

  1. Verify WSL feature installation:
   dism.exe /online /get-featureinfo /featurename:Microsoft-Windows-Subsystem-Linux
Enter fullscreen mode Exit fullscreen mode

⚠️ This requires administrator privileges.

Solution

If you encounter error code 0x80072745 or if the LxssManager service is missing, follow these steps:

  1. Open PowerShell or Command Prompt as Administrator (right-click and select "Run as Administrator")

  2. Enable required Windows features:

   dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
   dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Enter fullscreen mode Exit fullscreen mode
  1. Restart your computer

  2. After restart, update WSL (as Administrator):

   wsl --update
Enter fullscreen mode Exit fullscreen mode
  1. Try launching WSL again

Additional Troubleshooting

If issues persist:

  • Reset WSL:
  wsl --unregister <distro-name>
Enter fullscreen mode Exit fullscreen mode

Then reinstall the distribution from the Microsoft Store.

  • Update Windows: Ensure your Windows is up to date as WSL updates are often delivered through Windows Update.

  • Check for conflicting software: Some antivirus or firewall software might block WSL operations.

References

AWS Security LIVE! Stream

Streaming live from AWS re:Inforce

Tune into Security LIVE! at re:Inforce for expert takes on modern security challenges.

Learn More

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

World's Largest Hackathon: AI Translation with Lingo

The Lingo team joins us to explore how developers can translate their Bolt projects using AI. We'll discuss the future of building global apps, why more teams are turning to AI for localization, and what it means for your workflow. Don’t miss it!

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️