1

I tried running apt-get install apache2, and I'm up to date. I ran the different variations of sudo sytemctl enable --apache2.service and I get the message:

System has not been booted with system as init system (PID1).
Can't operate. Failed to connect to bus: Host is down

Any help with this issue?

I tried the wsl --terminate, and it did not work either.

NotTheDr01ds
  • 17,888
  • Welcome to Ask Ubuntu! I believe that my answer on the linked duplicate should answer your question, but if for some reason it doesn't, please let me know so that I can look at reopening this one. Thanks! – NotTheDr01ds Apr 18 '23 at 12:56
  • It most certainly did, thank you very much. I checked the few that popped up and did not see your advice, so I apologize, but apache2 is up and running. – Joe Slow Poke Rodriguez Aceved Apr 18 '23 at 14:40
  • No worries at all! Duplicates are often hard to search. Glad it helped! – NotTheDr01ds Apr 18 '23 at 14:53

1 Answers1

1

In earlier versions of Linux distributions, the init command was used as the default init system, which was responsible for starting system services, mounting filesystems, and managing system resources. However, most modern Linux distributions now use systemd as the default init system.

As it is clearly written in the error message that "System has not been booted with system as init system" and you are using wsl which uses init so instead of using systemctl which Is for newer versions of Linux, use service command.

sudo service apache2 start

to see which is used to start the system (init|systemd) you can use cat /proc/1/comm to see the name of PID 1

it will look something like this for init

system started with init

and like this for systemd

system started with systemd