LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemctl-reload-or-restart

Reload configuration or restart unit

TLDR

Reload or restart unit
$ systemctl reload-or-restart [unit]
copy
Reload or restart with pattern
$ systemctl reload-or-restart [pattern]
copy
Async (no wait)
$ systemctl reload-or-restart [unit] --no-block
copy
For user units
$ systemctl reload-or-restart [unit] --user
copy

SYNOPSIS

systemctl reload-or-restart [OPTIONS] PATTERN...

DESCRIPTION

systemctl reload-or-restart reloads one or more units if they support it. If not, it stops and then starts them instead. If the units are not running yet, they will be started.This is useful for applying configuration changes when you don't know whether a service supports hot reloading. If the unit has `ExecReload=` defined, configuration is reloaded without interrupting the service. Otherwise, the unit is stopped and started again.

PARAMETERS

--no-block

Return immediately without waiting
--user
Operate on user units

CAVEATS

Reload only works if the unit has ExecReload defined. Restart causes brief service interruption. For units without reload support, this always restarts.

HISTORY

The reload-or-restart subcommand provides a safe way to apply configuration changes without needing to know whether a service supports hot reloading.

SEE ALSO

Copied to clipboard
Kai