Windows
Linux
PowerShell Equivalents
Services
Windows PowerShell Stop-Service equivalent in Linux
Stops a running systemd service for the current boot.
Windows
→
PowerShell Stop-Service
Linux equivalents
sudo systemctl stop SERVICE
sudo systemctl stop SERVICE
sudo systemctl stop SERVICE
Overview
What this command does
Stops a running systemd service for the current boot.
Migration tip: A service can be started again manually unless it is disabled or masked.
Practical tasks
Common use cases
Stop a service
Stops a running systemd service for the current boot.
sudo systemctl stop nginx
Stop a service
systemctl is-active nginx
Check whether it is still active
sudo systemctl mask nginx
Prevent all starts until unmasked
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
sudo systemctl stop nginx
systemctl is-active nginx
sudo systemctl mask nginx
Walkthrough
Examples with explanations
sudo systemctl stop nginx # stop a running service
systemctl is-active nginx # check its state
sudo systemctl mask nginx # block future starts
Reference
Common options and variations
| Command or option | Use |
|---|---|
sudo systemctl stop nginx | Stop a service |
systemctl is-active nginx | Check whether it is still active |
sudo systemctl mask nginx | Prevent all starts until unmasked |
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 stop SERVICE |
Same systemctl/journalctl syntax on systemd-based Debian and Ubuntu systems. |
| Fedora | dnf + systemd | sudo systemctl stop SERVICE |
Same command syntax; service names can differ by package. |
| Arch | pacman + systemd | sudo systemctl stop SERVICE |
Same command syntax; enable services explicitly after package installation. |
Important
What to watch out for
Masking is stronger than disabling and can break dependent applications. Use it only when you understand the dependency impact.
Keep learning