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

Windows PowerShell Restart-Service equivalent in Linux

Stops and starts a systemd service so configuration or runtime state is reloaded.

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

Overview

What this command does

On Windows, "PowerShell Restart-Service" is used to restart a service. On Linux, the closest practical mapping shown here is "sudo systemctl restart SERVICE". Stops and starts a systemd service so configuration or runtime state is reloaded. This reference is grouped under PowerShell Equivalents → Services.

Migration tip: Some daemons support <code>reload</code>, which applies configuration without a full restart or connection interruption.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows PowerShell Restart-Service maps to sudo systemctl restart 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

Restart a service

Stops and starts a systemd service so configuration or runtime state is reloaded.

sudo systemctl restart nginx

Restart a service

sudo systemctl reload nginx

Reload configuration when supported

sudo systemctl reload-or-restart nginx

Reload or fall back to restart

Ready to run

Copyable Linux commands

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

sudo systemctl restart nginx
sudo systemctl reload nginx
sudo systemctl reload-or-restart nginx

Walkthrough

Examples with explanations

sudo systemctl restart nginx # restart a service
sudo systemctl reload nginx # reload configuration
sudo systemctl reload-or-restart nginx # choose reload when possible

Reference

Common options and variations

Command or optionUse
sudo systemctl restart nginxRestart a service
sudo systemctl reload nginxReload configuration when supported
sudo systemctl reload-or-restart nginxReload or fall back to restart

Distro differences

Debian/Ubuntu vs Fedora vs Arch

The command "sudo systemctl restart 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 restart SERVICE Same systemctl/journalctl syntax on systemd-based Debian and Ubuntu systems.
Fedora dnf + systemd sudo systemctl restart SERVICE Same command syntax; service names can differ by package.
Arch pacman + systemd sudo systemctl restart SERVICE Same command syntax; enable services explicitly after package installation.

Keep learning

Related PowerShell Equivalents commands