LinuxCommandLibrary

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 attempts to reload a unit's configuration if the unit supports reloading, otherwise it restarts the unit. This is useful for applying configuration changes when you don't know if the service supports hot reloading.
If the unit supports `ExecReload=`, 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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard