https://linuxhandbook.com/system-has-not-been-booted-with-systemd/
[Fixed] "System has not been booted with systemd as init system" Error
Learn how to fix "System has not been booted with systemd as init system (PID 1). Can't operate." with Ubuntu Linux on WSL.
linuxhandbook.com
Use
ps -p 1 -o comm=
command to see which system I'm using. Then change the command like the following.
(In my case, it was "init" after I typed the command)
Systemd commandSysvinit command
systemctl start service_name | service service_name start |
systemctl stop service_name | service service_name stop |
systemctl restart service_name | service service_name restart |
systemctl status service_name | service service_name status |
systemctl enable service_name | chkconfig service_name on |
systemctl disable service_name | chkconfig service_name off |