Rebooting WSL in Windows 1803
Solution 1:
Yes, it is.
As an Administrator restart the windows Service "LxssManager" on Windows 10. This does a clean boot of the WSL. The services in the Linux Subsystem - for example xrdp - must be restarted if not enabled for autostart.
Solution 2:
A Powershell solution
Get-Service LxssManager | Restart-Service
Solution 3:
-
WIN+R ->
services.msc
-
Find
LxssManager
-
Right-click ->
Restart
Solution 4:
As the other answers mention, specifically for windows 1803, the following should work from powershell or cmd:
net stop LxssManager
As highlighted by @Ramhound, only for newer versions, which have wsl 2, you can also run this from powershell or cmd:
shutdown all instances:
wsl.exe --shutdown
shutdown a specific instance (e.g. Ubuntu):
wsl.exe -t Ubuntu
to show the current list of instances:
wsl.exe -l