Can I explicitly start/stop a Linux subsystem?
Hello, I'm a WSL user, sometimes I just start a bash window and bring up services such as MySQL or nginx on that window, but when I close the bash window, the background process(nginx or MySQL services) are gone, I think It's because the bash window is closed.
So Is there a way to let the background process running while all Bash windows are closed? Or can this be added as a new feature in the future? Thanks.
Lewis Donofrio commented
Don't close the pid 0 bash window and all will keep on running as it should I do the following:
donofrio@WSAL0131:~$ cat setupxfce.sh
# setting up session environment
sudo service dbus start
sudo service cron start
sudo service lightdm start
sudo service cups-browsed start
sudo service urandom start
sudo service whoopsie start
exec dbus-run-session -- bash -c "startxfce4"