LinuxMedium

systemctl command not found: causes and solutions in Linux

This article explains what to do when encountering the 'systemctl command not found' error in Linux. You'll learn how to identify the init system, use alternative commands, and install systemd if necessary.

Updated at February 15, 2026
5-10 min
Easy
FixPedia Team
Применимо к:Linux (any distribution)WSL1Docker containersMinimal installations

What the "systemctl command not found" Error Means

The systemctl command not found error occurs when you try to run the systemctl command in a Linux terminal, but the shell cannot find it in the paths specified in the PATH variable. This means that either the systemctl command is not installed on your system, or the system uses a different init system that is not based on systemd.

The full error text usually looks like this:

bash: systemctl: command not found

This error is common in distributions that do not use systemd by default (e.g., Alpine Linux, Devuan), in minimal installations, in Docker containers, and also in Windows Subsystem for Linux (WSL) version 1.

Causes

  1. Systemd is not installed: Your distribution uses an alternative init system (SysVinit, OpenRC, runit). In this case, the systemctl command is missing.
  2. Minimal installation: Even in distributions that typically use systemd (Ubuntu, CentOS), when choosing a minimal image, the systemd package may not be included.
  3. WSL1: The first version of Windows Subsystem for Linux does not include systemd. Instead, it uses its own init system compatible with SysVinit.
  4. Containers: Docker images and other containers often do not run systemd to reduce size and speed up startup.
  5. Modified PATH variable: A rare case where systemd is installed, but the directory containing systemctl (usually /usr/bin) is not in PATH.

Solutions

Solution 1: Check if systemd is installed

First, determine if the systemd package is installed on your system.

For Debian/Ubuntu and derivatives:

dpkg -l systemd 2>/dev/null | grep -i systemd

If the package is not installed, the output will be empty.

For RHEL/CentOS/Fedora:

rpm -qa | grep -i systemd

For Arch Linux:

pacman -Qs systemd

If systemd is not found, proceed to Solution 3.

Solution 2: Identify the active init system

Even if systemd is installed, the system may be using a different init system. Run:

ps -p 1 -o comm=
  • If the output is systemd — systemd is active, and the problem might be with PATH (see Solution 4).
  • If the output is init — SysVinit is being used.
  • If the output is runit — runit is being used.
  • If the output is busybox — often in Alpine Linux (OpenRC).

Solution 3: Use alternative service management commands

Depending on your init system:

For SysVinit (traditional scripts in /etc/init.d/):

sudo service <service_name> <action>
# Example: sudo service nginx start

Or directly:

sudo /etc/init.d/<service_name> <action>

For OpenRC (Alpine, Gentoo):

sudo rc-service <service_name> <action>
# Example: sudo rc-service docker start

For runit:

sudo sv <action> <service_directory>
# Example: sudo sv start /etc/sv/nginx

For WSL1: use service as in SysVinit. To autostart services on WSL boot, add commands to ~/.bashrc or use /etc/rc.local.

Solution 4: Add the path to systemctl to PATH (if systemd is installed but not found)

If systemd is installed but systemctl is not in PATH, find its location:

sudo find /usr -name systemctl 2>/dev/null

Usually, systemctl is located in /usr/bin/systemctl. If you find it in a different directory (e.g., /usr/local/bin), add that directory to PATH:

export PATH=$PATH:/path/to/directory

To make the change permanent, add the line to ~/.bashrc or ~/.profile and run source ~/.bashrc.

Solution 5: Install systemd (if it is not installed but needed)

Warning: Installing systemd in a distribution that does not use it by default can break your system. Only do this if you are sure about compatibility.

For Debian/Ubuntu:

sudo apt update
sudo apt install systemd

For RHEL/CentOS 7 and older:

sudo yum install systemd

For RHEL/CentOS 8+ / Fedora:

sudo dnf install systemd

For Arch Linux:

sudo pacman -S systemd

After installation, reboot the system and check systemctl list-units.

Solution 6: For WSL1: Switch to WSL2

WSL2 (starting with Windows 11 version 22H2) supports systemd. If you have Windows 11:

  1. Update WSL:
    wsl --update
    
  2. Install WSL2 (if not already installed):
    wsl --set-default-version 2
    
  3. Install a distribution with systemd support (e.g., Ubuntu 22.04+).

If you have Windows 10, WSL2 does not support systemd. In this case, use alternative commands (Solution 3) or a full virtual machine.

Prevention

  • Before choosing a distribution, verify which init system it uses by default.
  • In distributions with a choice of init systems (Devuan), be careful during installation.
  • When using Docker containers, remember that systemd is usually not running. For managing services inside a container, use commands provided by the base image (e.g., service) or manage processes directly.
  • In WSL1, plan a migration to WSL2 if systemd is required.
  • Keep your system updated to avoid package conflicts.

F.A.Q.

Why is systemctl not available in WSL1?
Can I install systemd in Alpine Linux?
How do I check which init system is active?
What if systemctl exists but requires sudo?

Hints

Check if systemctl is available in your system
Identify the active init system
Use the service command for SysVinit
Use rc-service for OpenRC
For WSL1: manage services via service
If you need systemd: install the package
FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community