systemctl-restart

Stop and restart systemd units

TLDR

Restart a unit
$ systemctl restart [unit]
Restart multiple units
$ systemctl restart [unit1] [unit2]
Restart a user unit
$ systemctl restart [unit] --user

SYNOPSIS

systemctl [OPTIONS...] restart PATTERN...

DESCRIPTION

systemctl restart stops and then starts systemd units. This is useful when a service needs to be fully restarted to pick up configuration changes or recover from an error state.Unlike systemctl reload, restart fully stops the service process and starts a new one. This causes a brief interruption but ensures a clean restart. Can be used on stopped units, but systemctl start is safer to avoid accidentally restarting running services.

PARAMETERS

--user

Restart user service manager units instead of system units
--no-block
Do not wait for the operation to complete
--job-mode=MODE
Specify how to deal with already queued jobs

INSTALL

sudo apt install systemd
sudo dnf install systemd
sudo pacman -S systemd
sudo zypper install systemd
brew install systemd
nix profile install nixpkgs#systemd

CAVEATS

Requires root privileges for system units. Causes service interruption during restart. For configuration reloads without interruption, use systemctl reload if the service supports it.

SEE ALSO

systemctl(1), systemctl-start(1), systemctl-reload(1)