Can I safely shutdown WSL2 without stopping services like mysql and apache?
5,621
I would not like to screw up my environment (databases or apache, etc.)
For safety you should shut down those services first.
You should be able to write a small batch file that shuts everything down in the right order.
Related videos on Youtube
![kanlukasz](https://i.stack.imgur.com/vux3F.png?s=256&g=1)
Author by
kanlukasz
Updated on September 18, 2022Comments
-
kanlukasz almost 2 years
I am using the classic LAMP development environment with WSL2(
Ubuntu
) on Windows 10.I would like to shutdown WSL2 after finishing my work in order to be able to free resources (the Vmmem process can be resource consuming).
Can I safely shutdown WSL2 (
wsl --shutdown
) without stopping services like mysql and apache, or should I stop them manually before shutting down WSL2?Does it matter? Is there any good practice or could something go wrong? I would not like to screw up my environment (databases or apache, etc.)