W10 Subsystem Linux: Ubuntu 16.04: systemd not started
Through the links provided by Hi-Angel I have learned that systemd is not supported by WSL Ubuntu and that the current architecture of WSL Ubuntu will require non-trivial changes to add support.
As Hi-Angel points out in the comments there is an active feature request for systemd on WSL. At this time it is not a highly ranking request, but with a cursory scan I see that higher ranked requests will require systemd support.
Related videos on Youtube
Stephen Boston
Updated on September 18, 2022Comments
-
Stephen Boston over 1 year
I installed the Ubuntu app as described here:
https://msdn.microsoft.com/en-us/commandline/wsl/aboutsystemd is installed:
root@Asus:/var/log# apt list --installed | grep systemd WARNING: apt does not have a stable CLI interface. Use with caution in scripts. libpam-systemd/xenial-updates,now 229-4ubuntu21 amd64 [installed] libsystemd0/xenial-updates,now 229-4ubuntu21 amd64 [installed] python3-systemd/xenial,now 231-2build1 amd64 [installed] systemd/xenial-updates,now 229-4ubuntu21 amd64 [installed] systemd-sysv/xenial-updates,now 229-4ubuntu21 amd64 [installed]
But not running:
root@Asus:/var/log# pgrep -fa systemd root@Asus:/var/log#
All calls to systemd produce the same result. As here:
root@Asus:/var/log# systemctl status Failed to connect to bus: No such file or directory
I hope it is as simple as putting systemd into the init sequence but I don't know how to do that. And because the logging systemd logging system is not running I can't find any startup logs.
I find lots of info about how to use systemd once it is running but I've not yet found anything about getting it started.
Thanks.
-
Hi-Angel over 6 yearsYou haven't found anything about getting it started because normally "can't get systemd started" means you can't boot. But your usecase is very special in that using Windows implies it at least is using its own init system. As for the question, well, try to execute
systemctl status
just to see if it works. If it does I think everything should be fine, you maybe just need to enable some services throughsystemctl
manually. Otherwise update the post with the error. -
Stephen Boston over 6 years@Hi-Angel. Updated the question with your suggestion
-
user535733 over 6 yearsSeems like an XY problem. Why do you want systemd to be running? What are you trying to use it for?
-
Stephen Boston over 6 yearsLooking into WSL a bit more I see that it's not what I thought it was. It's intended to be a UNIXy access to the windows services and files? Is that how people understand it? I have my VBox. I can tinker with Docker.
-
Hi-Angel over 6 yearsDid you try googling
systemd wsl
? I'm asking because I've found this link. I didn't dig into it much, because this is not really a bug but rather discussion, but you might want to (and maybe post an answer based on this). My guess is, WSL isn't mature enough for running systemd. -
Hi-Angel over 6 yearsWSL is intended to run Linux apps. You can do alike with MinGW.
-
Hi-Angel over 6 yearsYeah, as I said, I didn't dig into details, but I seem to be correct. You might consider voting for this feature request
-
-
Hi-Angel over 6 yearsGood answer, just one remark: it would be more correct to say just "WSL" rather than "WSL Ubuntu". Because GNU/Linux apps are supposed to run on WSL unmodified, so saying "WSL systemd" or "WSL Xorg" would not make sense either. "WSL" is a subsystem of Windows 10, it is pretty much the inverse of "WINE" on GNU/Linux. UPD: there's also no need to mention my nickname, I expected you'd be interested to read the links and write an answer with technicalities, but it's up to you ofc.