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?