Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WSL Ubuntu hangs, how to restart?

Occasionally WSL hangs on Windows 10. Opening "Ubuntu" bash just hangs. Any way to restart WSL without rebooting Windows ?

enter image description here

like image 637
Ross Ivantsiv Avatar asked Jan 23 '18 16:01

Ross Ivantsiv


People also ask

How do I restart Ubuntu in WSL?

From the Services window search for a Windows Subsystem for Linux service called LxssManager. Right-click on Lxssmanager service and select the option Restart. This will reboot/restart the windows subsystem for Linux -WSL (Ubuntu, Debian, Kali, OpenSUSE, etc).

How do I stop LxssManager?

search for the LxssManager and grab the PID, then run task manager as administrator, in the details tab, search for the svchost.exe containing the PID, right click it and select 'end process tree'.


1 Answers

I believe the most effective way today for WSL2, in Cmd Prompt / PowerShell:

wsl --shutdown 
like image 85
Dane Balia Avatar answered Sep 19 '22 21:09

Dane Balia