How to Fix ‘System Has Not Been Booted with Systemd as Init System’ in Ubuntu

Executing service management commands such as sudo systemctl start nginx, systemctl status docker, or managing daemon units on Ubuntu only to be stopped by the critical error message “System has not been booted with systemd as init system (PID 1). Can’t operate. Failed to connect to bus: Host is down” halts server configuration workflows.

The systemctl utility communicates directly with systemd via the system D-Bus socket located at /run/systemd/system/. For systemd to function, it must run as Process ID 1 (PID 1), the absolute root of the Linux process hierarchy. This error occurs almost exclusively when running Ubuntu inside environments that do not boot an init system by default: Windows Subsystem for Linux (WSL 1 or older WSL 2 images), Docker/Podman container images running a bare shell, chroot rescue environments, or lightweight virtualisation containers that utilise legacy SysVinit or custom init wrappers.

Environment Default Init Architecture Technical Resolution
WSL 2 (Modern) Historically booted Microsoft custom init wrapper Add [boot] systemd=true in /etc/wsl.conf and restart WSL instance
WSL 1 (Legacy) Emulated NT kernel translation layer (no Linux init) Upgrade instance to WSL 2 architecture via Windows PowerShell
Docker / OCI Container Process container running targeted binary as PID 1 Use legacy ‘service’ commands or run systemd-enabled multi-stage container
Chroot Rescue Shell Target filesystem mounted without active host PID 1 cgroups Bind-mount /sys, /proc, and /dev before entering chroot shell
Standard Ubuntu Server / VM Kernel boot parameter points to alternative init daemon Restore ‘init=/lib/systemd/systemd’ kernel parameter in GRUB

Method 1: Enable Native Systemd in Windows Subsystem for Linux (WSL 2)

Recent versions of WSL 2 natively support systemd, but the feature must be explicitly enabled inside the distribution’s configuration file.

  1. Open your Ubuntu WSL terminal prompt.
  2. Open or create the global WSL configuration file using an administrative editor:
    sudo nano /etc/wsl.conf
  3. Add the following configuration block to the file:
    [boot]
    systemd=true
  4. Save the file by pressing Ctrl + O, then Enter, and exit using Ctrl + X.
  5. Switch to an administrative PowerShell prompt in Windows and shut down all active WSL instances:
    wsl.exe --shutdown
  6. Relaunch your Ubuntu terminal from the Windows Start menu.
  7. Verify that systemd is now running as PID 1:
    ps -p 1 -o comm=

    The command should return systemd instead of init.

  8. Test service management by running sudo systemctl status.

Method 2: Update WSL to Support Systemd Features

If enabling systemd=true in /etc/wsl.conf does not take effect, your Windows WSL package may be outdated.

  1. Open an elevated PowerShell prompt as Administrator.
  2. Execute the following command to download and install the latest Microsoft WSL package:
    wsl --update
  3. Confirm that your distribution is running on version 2 rather than version 1:
    wsl -l -v
  4. If your Ubuntu distribution is listed as version 1, convert it to WSL 2:
    wsl --set-version Ubuntu 2
  5. Restart the WSL subsystem with wsl --shutdown and relaunch Ubuntu.

Method 3: Use Legacy Service Commands in Containers and Minimal Shells

If you are operating inside a Docker container, an LXC environment, or an unmanaged chroot where systemd cannot be mounted as PID 1, use the traditional SysVinit compatibility wrapper.

  1. Instead of executing systemctl commands, invoke the service command:
    sudo service apache2 start
    sudo service apache2 status
  2. Alternatively, execute the init script directly from the /etc/init.d/ directory:
    sudo /etc/init.d/ssh restart
  3. For automatic process supervision in containerized environments, consider lightweight process managers such as Supervisord, Runit, or tini rather than attempting to force full systemd initialization.

Method 4: Mount Required Filesystems in Chroot Rescue Environments

When repairing an unbootable Ubuntu installation from a Live USB environment, attempting to run systemctl inside a chroot fails if virtual filesystems are not bind-mounted.

  1. Before executing chroot, mount the essential kernel interfaces from the host environment to the target mount point (e.g. /mnt):
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys
    sudo mount --bind /run /mnt/run
  2. Enter the chroot environment:
    sudo chroot /mnt
  3. Verify that system D-Bus and run mounts are visible to restore operational communications.

Ensuring Init System Stability in Ubuntu

When choosing virtualisation platforms or provisioning cloud instances, ensure that your deployment architecture matches the requirements of your application stack. Workloads requiring complex systemd service timers, socket activation, and cgroup resource governance require full WSL 2 or hardware virtual machines rather than bare application containers.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.