Closed noordawod closed 5 years ago
There is no init on WSL, including systemd.
The Linux image is 'booted' directly to the default shell, no GRUB, kernel, or services are loaded.
The best way to start a service on WSL is to start with an old-fashioned init script linked from .bashrc or make a .bat file that calls Fedora Remix for WSL followed by your command or path to a script that launches your service, e.g. fedoraremix.exe run "echo hello world"
Alright, thanks for the explanation. My first foray into WSL :)
I have a primer on WSL here that you might find helpful: https://github.com/sirredbeard/Awesome-WSL
Hi, and thanks for this wonderful remix!
I'm not sure whether this is a bug or a feature (intended) so that's why I chose to open a regular issue. When trying to use systemd to enable a service on boot (say,
systemctl start sshd
), I get the following error message:System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down
I understand the message and I suppose this is partly because of spinning Fedora inside WSL, so just wondering is there any other recommended way to start daemons on boot?
Thanks.