Home Explore Blog CI



man-pages

11th chunk of `systemctl.man`
4051879f1ef811ae944adafdfb0582dd73f45f5ed84ba5e40000000100000fa0
 section of the unit files. While this command is the recommended way to manipulate the unit configuration directory, the administrator
           is free to make additional changes manually by placing or removing symlinks below this directory. This is particularly useful to create configurations that deviate from the suggested default installation. In this
           case, the administrator must make sure to invoke daemon-reload manually as necessary, in order to ensure the changes are taken into account.

           When using this operation on units without install information, a warning about it is shown.  --no-warn can be used to suppress the warning.

           Enabling units should not be confused with starting (activating) units, as done by the start command. Enabling and starting units is orthogonal: units may be enabled without being started and started without being
           enabled. Enabling simply hooks the unit into various suggested places (for example, so that the unit is automatically started on boot or when a particular kind of hardware is plugged in). Starting actually spawns
           the daemon process (in case of service units), or binds the socket (in case of socket units), and so on.

           Depending on whether --system, --user, --runtime, or --global is specified, this enables the unit for the system, for the calling user only, for only this boot of the system, or for all future logins of all users.
           Note that in the last case, no systemd daemon configuration is reloaded.

           Using enable on masked units is not supported and results in an error.

       disable UNIT...
           Disables one or more units. This removes all symlinks to the unit files backing the specified units from the unit configuration directory, and hence undoes any changes made by enable or link. Note that this
           removes all symlinks to matching unit files, including manually created symlinks, and not just those actually created by enable or link. Note that while disable undoes the effect of enable, the two commands are
           otherwise not symmetric, as disable may remove more symlinks than a prior enable invocation of the same unit created.

           This command expects valid unit names only, it does not accept paths to unit files.

           In addition to the units specified as arguments, all units are disabled that are listed in the Also= setting contained in the [Install] section of any of the unit files being operated on.

           This command implicitly reloads the system manager configuration after completing the operation. Note that this command does not implicitly stop the units that are being disabled. If this is desired, either
           combine this command with the --now switch, or invoke the stop command with appropriate arguments later.

           This command will print information about the file system operations (symlink removals) executed. This output may be suppressed by passing --quiet.

           This command honors --system, --user, --runtime, --global and --no-warn in a similar way as enable.

       reenable UNIT...
           Reenable one or more units, as specified on the command line. This is a combination of disable and enable and is useful to reset the symlinks a unit file is enabled with to the defaults configured in its [Install]
           section. This command expects a unit name only, it does not accept paths to unit files.

       preset UNIT...
           Reset the enable/disable status one or more unit files, as specified on the command line, to the defaults configured in the preset policy files. This has the same effect as disable or enable, depending how the
           unit is listed in the preset files.

           Use --preset-mode= to control whether units shall be enabled and disabled, or only enabled, or only disabled.

           If the unit carries no install information, it will be silently ignored by this command.  UNIT must be the

Title: systemctl Commands: enable (continued), disable, reenable, preset
Summary
This section continues the description of systemctl commands, focusing on enabling, disabling, re-enabling, and resetting unit files. The `enable` command (continued) emphasizes the distinction between enabling and starting units, the effect of `--system`, `--user`, `--runtime`, or `--global` options, and the incompatibility with masked units. `disable` removes symlinks created by `enable` or `link`, and it also disables units listed in the Also= setting. `reenable` combines `disable` and `enable` to reset symlinks. `preset` resets the enable/disable status of units based on preset policy files and is affected by the `--preset-mode=` option.