Using WSL2 on Windows 10, the Linux shell does not recognize commands which are supposed to function. Also, Docker Desktop fails to launch, saying WSL integration stopped and exited with code 1. When I
echo $PATH, as suspected, many previously available commands are not included.
But then I run
wsl --shutdown in Powershell and start wsl anew. Now all the Windows-related commands are back (ones starting with
/mnt/c), and Docker Engine is now able to start. Once it does, the
kubectl commands become recognized again also. Now there are way more path variables than before:
What could be the cause of this? I don't want to go through the rigmarole of shutting down and restarting WSL whenever I turn on my machine.