← All commands
Topic hub PowerShell Equivalents
Windows Linux PowerShell Equivalents Expanded guide Services

Windows PowerShell Set-Service -StartupType equivalent in Linux

Controls whether a systemd service starts automatically during boot.

Windows PowerShell Set-Service -StartupType
→
Linux equivalents
Debian/Ubuntu apt + systemd
sudo systemctl enable SERVICE
Fedora dnf + systemd
sudo systemctl enable SERVICE
Arch pacman + systemd
sudo systemctl enable SERVICE

Overview

What this command does

On Windows, "PowerShell Set-Service -StartupType" is used to configure startup behavior. On Linux, the closest practical mapping shown here is "sudo systemctl enable SERVICE". Controls whether a systemd service starts automatically during boot. This reference is grouped under PowerShell Equivalents → Services.

Migration tip: <code>enable --now</code> both enables and starts a service. <code>disable --now</code> disables and stops it.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows PowerShell Set-Service -StartupType maps to sudo systemctl enable SERVICE for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Elevated privilege appears in this workflow

At least one example uses sudo. Confirm the target path, device, service or package before running the elevated form; do not add sudo simply to bypass an unexplained permission error.

Practical tasks

Common use cases

Configure startup behavior

Controls whether a systemd service starts automatically during boot.

sudo systemctl enable --now sshd

Enable and start a service

sudo systemctl disable --now sshd

Disable and stop a service

systemctl is-enabled sshd

Check startup state

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

sudo systemctl enable --now sshd
sudo systemctl disable --now sshd
systemctl is-enabled sshd

Walkthrough

Examples with explanations

sudo systemctl enable --now sshd # start now and at boot
sudo systemctl disable --now sshd # stop now and disable boot startup
systemctl is-enabled sshd # check whether startup is enabled

Reference

Common options and variations

Command or optionUse
sudo systemctl enable --now sshdEnable and start a service
sudo systemctl disable --now sshdDisable and stop a service
systemctl is-enabled sshdCheck startup state

Distro differences

Debian/Ubuntu vs Fedora vs Arch

The command "sudo systemctl enable SERVICE" is the same in all three rows, while package or base details differ: Debian/Ubuntu uses apt + systemd; Fedora uses dnf + systemd; Arch uses pacman + systemd.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu apt + systemd sudo systemctl enable SERVICE Same systemctl/journalctl syntax on systemd-based Debian and Ubuntu systems.
Fedora dnf + systemd sudo systemctl enable SERVICE Same command syntax; service names can differ by package.
Arch pacman + systemd sudo systemctl enable SERVICE Same command syntax; enable services explicitly after package installation.

Keep learning

Related PowerShell Equivalents commands