How To Fix “system has not been booted with systemd as init system (pid 1). can’t operate” Error
If you are using Ubuntu in WSL and try to run sudo systemctl start
command then you might come across the “system has not been booted with systemd as init system (pid 1). can’t operate” Error. The one and only reason for this is that your Linux system is not using systemd.In WSL, Ubuntu uses SysV instead of systemd. systemctl is a command-line tool to manage systemd daemons/services while SysV is one of the first init systems for the UNIX/Linux operating system
How To Fix “system has not been booted with systemd as init system (pid 1). can’t operate” Error
One and only way to fix this error is to use the alternate command that does same job if you have uses systemd command . Let’s have a look into the list of the equivalent sysvinit command for systemd.
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 |