When you run Systemd commands, you may receive error “System has not been booted with systemd as init system (PID 1). Can’t operate.

The reason why this error occurs is that the Linux system is not using systemd as the init system : you are trying to use systemd command to manage services on Linux but your system doesn’t use systemd and (most likely) using the classic SysV init (sysvinit) system.

But how is that possible? If you are using Ubuntu inside Windows using WSL, you will have SysV instead of systemd and your system will complain when you run the systemctl command (intended for Linux systems with systemd init system).

How to know which “Init System” you are using ?

You may use this command to know the process name associated with PID 1 (the first process that runs on your system):

ps -p 1 -o comm=

It should show init or sysv (or something like that) in the output. If you see init, your system is not using systemd and you should use the init commands as explained in the next section.

How to fix ‘System has not been booted with systemd’ error?

The simple answer is to not use the systemctl command. Instead, use the equivalent sysvinit command.

It’s not too complicated and both commands have somewhat similar syntax.

By Shabazz

Software Engineer, MCSD, Web developer & Angular specialist

Leave a Reply

Your email address will not be published. Required fields are marked *