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 docker
and 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.
real installation
so you have not as default the same package list installed. This is the same for the environment variables, so you have to set them all for your needs. Do not forgot to make that in .profile or .bashrc etc.... else you loose your variables at end of session. In case of crash of the WSL session this is similar you loose the unsaved environment variables & then your tools might fail. If you want to use deep applications, & huge applications, use a virtual machine not WSL . This is most for good practices & to avoid this kind od use-cases failures.