I have created a
*.bat file, and running it does the rebooting within 10 seconds. (I am amazed by how fast things get reloaded. And, please advise if my approach will cause serious trouble in the long run.)
Put the following two lines in a
WSL_reboot.bat file, and run it every time you need to reboot the WSL on Windows 10.
net stop LxssManager
net start LxssManager
Update note: per my recent "upgrade" of Windows OS, the Build 1809 does not like
sc command anymore.
Side note: one need to reboot the WSL "kernel" when he/she format a lettered-drive through Windows Explorer. Haven't quite solve the by-product, though, where
ls command will get the following error. Related-post-from-WSL@Github; Related-post-from-the-Stack. Will drop a link if I manage to solve the by-product bug.
ls: 'System Volume Information': Permission denied
d--x--x--x 1 llinfeng llinfeng 512 Jan 15 11:00 'System Volume Information'/