Name

systemd-install — Enable or disable a systemd unit definition file

Synopsis

systemd-install [OPTIONS...] enable [NAME...]

systemd-install [OPTIONS...] disable [NAME...]

systemd-install [OPTIONS...] test [NAME...]

Options

The following options are understood:

--help

Prints a short help text and exits.

--force

Enable/disable a service even if it conflicts with/contradicts another service. This might have the effect of disabling another service that was enabled.

--system

Enable/disable a system service.

--session

Enable/disable a session service for the calling user.

--global

Enable/disable a session service for all users.

--start[=MODE]

After enabling/disabling stop/restart the unit and reload manager configuration. Optionally, takes one of no, minimal, maybe or yes. If no is passed the manager will not reload its configuration and no service will be started or stopped after enabling/disabling of the unit files. If minimal is passed and a unit is being enabled it will also be restarted should it already be running. If a unit is being disabled it will be stopped should it be running. In either case the daemon configuration is reloaded. maybe is similar to this, but the unit will also be started if it is being enabled and any of the units listed in WantedBy= in the [Install] section of the unit file is already activated. Finally yes starts the unit unconditionally after enabling. This setting defaults to no. If the mode value is omitted defaults to maybe. This option has no effect when --global or test is used.

The following commands are understood:

enable

Enable a unit. This will create a number of symlinks as encoded in the [Install] section of a unit file.

disable

Disable a unit. This will remove a number of symlinks as encoded in the [Install] section of a unit file.

test

Checks whether any of the units specified are installed. This will check for the existence of a number of symlinks as encoded in the [Install] section of a unit file.