Windows
Linux
PowerShell Equivalents
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
sudo systemctl enable SERVICE
sudo systemctl enable SERVICE
sudo systemctl enable SERVICE
Overview
What this command does
Controls whether a systemd service starts automatically during boot.
Migration tip:
enable --now both enables and starts a service. disable --now disables and stops it.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 option | Use |
|---|---|
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 |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
systemd commands are mostly distribution-neutral, but package names and service unit names can differ.
| Distribution | Package manager / base | Equivalent command | Difference 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