LinuxCommandLibrary

systemctl-reenable

Disable then re-enable a unit

TLDR

Re-enable unit

$ systemctl reenable [unit]
copy
Re-enable multiple units
$ systemctl reenable [unit1 unit2 ...]
copy
Re-enable and start immediately
$ systemctl reenable [unit] --now
copy

SYNOPSIS

systemctl reenable [OPTIONS] UNIT...

DESCRIPTION

systemctl reenable is equivalent to running `disable` followed by `enable`. It removes all existing symlinks for the unit and recreates them according to the current [Install] section in the unit file.
This is useful when a unit's [Install] section has changed (e.g., the targets it should be enabled for), as `enable` alone won't update existing symlinks.

PARAMETERS

--now

Also start the unit after re-enabling
--user
Operate on user units

CAVEATS

Unlike `enable`, this always recreates symlinks even if the unit is already enabled. Use when changing which targets a service belongs to.

HISTORY

The reenable subcommand provides a single command for updating enablement configuration when unit install targets change, avoiding the manual disable/enable sequence.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community