LinuxCommandLibrary

systemctl-preset

Reset unit enablement to defaults

TLDR

Reset to preset defaults

$ systemctl preset [unit1 unit2 ...]
copy
Enable only mode
$ systemctl preset [unit] --preset-mode enable-only
copy
Disable only mode
$ systemctl preset [unit] --preset-mode disable-only
copy
Quiet mode
$ systemctl preset [unit] -q
copy

SYNOPSIS

systemctl preset [OPTIONS] UNIT...

DESCRIPTION

systemctl preset resets the enablement state of specified unit files to the defaults defined in preset policy files. Preset files in `/usr/lib/systemd/system-preset/` and `/etc/systemd/system-preset/` define which units should be enabled or disabled by default.
This is typically used after package installation to set the initial enablement state according to distribution policy.

PARAMETERS

--preset-mode= MODE

full (default), enable-only, or disable-only
-q, --quiet
Suppress output, return only exit code
--user
Operate on user units

CAVEATS

Preset policies are distribution-specific. Running preset on a unit may change whether it starts at boot. Use `--preset-mode` to limit changes to only enabling or disabling.

HISTORY

The preset subcommand implements policy-based enablement, allowing distributions to define default service states while letting administrators override them.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community