LinuxCommandLibrary

systemctl-restart

Stop and restart systemd units

TLDR

Restart a unit

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

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

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community