How To Fix “system has not been booted with systemd as init system (pid 1). can’t operate” Error
First, let’s have a look at the source of the error. You will get the System has not been booted with systemd as init system (PID 1). Can’t operate error when you run the command sudo systemctl start
in your command.
Fix “system has not been booted with systemd as init system (pid 1). can’t operate” Error
Ubuntu inside Windows using WSL. uses SysV instead of systemd. Now, run the following command to PID 1 process name.
ps -p 1 -o comm=
One of the best solutions for the error system that has not been booted with systemd as init system (pid 1) is to use the alternate command of a system that does the same job. As your system is not using systemd, You can run the equivalent sysvinit command instead of systemd. You can find the list of alternative command to systemd command
sysvinit Command | systemd Command |
systemctl start example | service example start |
systemctl stop example | service example stop |
systemctl restart example | service example restart |
systemctl reload example | service example reload |
systemctl condrestart example | service example condrestart |
systemctl status example | service example status |
systemctl enable example | chkconfig example on |
systemctl disable example | chkconfig example off |
systemctl is-enabled example | chkconfig example –list |
systemctl list-unit-files –type=service | chkconfig |
systemctl daemon-reload | chkconfig example –add |
For another error
Docker System has not been booted with systemd as init system
Try to use: sudo /etc/init.d/docker start
instead of systemd.
Let us know if we are able to solve your issue. if you have any alternative solution for this problem then please let us know. We would love to update our blog post.