Is there a way to have windows subsystem for linux only run when i open it

0

Currently what I have done is installed lamp on ubuntu using the windows subsystem for Linux. However when I close ubuntu or restarted the computer, the web server is still active. Is there any way to make it so that the server is only running then I open the ubuntu application?

Leon W

Posted 2018-09-17T18:17:39.837

Reputation: 305

1If you are going to run a service within the WSL instance then you should stop the LAMP service manually, before you close the UWP instance. Closing the WSL instance does not end the process, it should only suspend the instance, since UWP applications don't typically close when their window are closed. – Ramhound – 2018-09-17T18:56:40.583

@Ramhound Ok, if I did stop the services manually would there be any default Linux services that would continue to run and use up resources or would those stop when closed? I'm just concerned about protentional battery life drains if unwanted services are still running. – Leon W – 2018-09-17T20:01:13.447

1As I don't have a WSL instance in front of me to verify, what services by default are installed, you should run the command to see that for yourself. Although I seem to recall no services running when I last played with my WSL instance. – Ramhound – 2018-09-17T20:16:13.410

No answers