1

I have an issue with Windows Subsystem for Linux (WSL). I'm using a Windows 10 laptop shared by my company.

I first reinstalled Windows 10. Then I installed WSL using wsl --install per the doc. Everything was working, but it installed Ubuntu 20.04. I wanted Ubuntu 22.04.

When I was looking at which distro I could install by using the command:

wsl --list --online

So I was like, hey maybe, I could use the command wsl --update to update my WSL, maybe it was not fully updated. I was wrong, it was my Windows not updated.

But anyway, I tried the command, and it froze; nothing was happening. I tried Ctrl+C to stop the execution of the command. From here I could not do any command in admin PowerShell; it would just hang forever.

But I noticed that I could still use the command in User mode, but not admin. However, I needed to launch the distro in admin mode otherwise I had a credential issue.

The thing is the WSL used in non-root mode was not updated -- I didn't have the new feature with the GUI which I need for my project.

So in non-root PowerShell, I did the update command:

wsl --update

And now, I can have the GUI. But at that point, in my distro, apt update, apt install commands don't work anymore.

So I have to uninstall WSL in user mode to use apt install, and reinstall it every time to have the GUI

That's not really what I want. I obviously already tried to uninstall everything distro and WSL. I used this answer to uninstall WSL.

And now after reinstalling WSL in root mode. Even after uninstalling it hung forever...

Do you have any idea to have a WSL working without reinstalling again Windows?

NotTheDr01ds
  • 17,574
  • 4
  • 44
  • 81
Everdream
  • 11
  • 2
  • When you first installed WSL2 did you installed the Legacy version or the [Windows Store](https://devblogs.microsoft.com/commandline/the-windows-subsystem-for-linux-in-the-microsoft-store-is-now-generally-available-on-windows-10-and-11/) version? – Ramhound Feb 02 '23 at 15:27
  • A few more questions -- Does `wsl --version` report anything in PowerShell? Does it report the same thing if you run it as your regular user and then again as Admin? Also, can you provide more detail on what you mean about having to "uninstall WSL in user mode" and then reinstall? What exactly are you doing there? Thanks! – NotTheDr01ds Feb 04 '23 at 15:34

0 Answers0