Home Explore Blog CI



man-pages

14th chunk of `systemctl.man`
09901b29168078a80030cf26333cef50912a6f660925af270000000100001134
 another error occurred. Note │ > 0       │
           │                   │ that is-enabled will not actually return this state, but │           │
           │                   │ print an error message instead. However the unit file    │           │
           │                   │ listing printed by list-unit-files might show it.        │           │
           ├───────────────────┼──────────────────────────────────────────────────────────┼───────────┤
           │ "not-found"       │ The unit file doesn't exist.                             │ 4         │
           └───────────────────┴──────────────────────────────────────────────────────────┴───────────┘

       mask UNIT...
           Mask one or more units, as specified on the command line. This will link these unit files to /dev/null, making it impossible to start them. This is a stronger version of disable, since it prohibits all kinds of
           activation of the unit, including enablement and manual activation. Use this option with care. This honors the --runtime option to only mask temporarily until the next reboot of the system. The --now option may be
           used to ensure that the units are also stopped. This command expects valid unit names only, it does not accept unit file paths.

       unmask UNIT...
           Unmask one or more unit files, as specified on the command line. This will undo the effect of mask. This command expects valid unit names only, it does not accept unit file paths.

       link PATH...
           Link a unit file that is not in the unit file search path into the unit file search path. This command expects an absolute path to a unit file. The effect of this may be undone with disable. The effect of this
           command is that a unit file is made available for commands such as start, even though it is not installed directly in the unit search path. The file system where the linked unit files are located must be
           accessible when systemd is started (e.g. anything underneath /home/ or /var/ is not allowed, unless those directories are located on the root file system).

       revert UNIT...
           Revert one or more unit files to their vendor versions. This command removes drop-in configuration files that modify the specified units, as well as any user-configured unit file that overrides a matching vendor
           supplied unit file. Specifically, for a unit "foo.service" the matching directories "foo.service.d/" with all their contained files are removed, both below the persistent and runtime configuration directories
           (i.e. below /etc/systemd/system and /run/systemd/system); if the unit file has a vendor-supplied version (i.e. a unit file located below /usr/) any matching persistent or runtime unit file that overrides it is
           removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below /etc/systemd/system or /run/systemd/system, but not in a unit file stored below /usr/), then it is not removed.
           Also, if a unit is masked, it is unmasked.

           Effectively, this command may be used to undo all changes made with systemctl edit, systemctl set-property and systemctl mask and puts the original unit file with its settings back in effect.

       add-wants TARGET UNIT..., add-requires TARGET UNIT...
           Adds "Wants=" or "Requires=" dependencies, respectively, to the specified TARGET for one or more units.

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

       edit UNIT...
           Edit a drop-in snippet or a whole replacement file if --full is specified, to extend or override the specified unit.

           Depending on whether --system (the default), --user, or --global is specified, this command creates a drop-in file for each unit either for the system, for the calling user, or for all futures logins of all users.
           Then, the editor (see the "Environment" section below) is

Title: systemctl: mask, unmask, link, revert, add-wants/requires, and edit commands
Summary
This section describes several systemctl commands: `mask` to prevent unit activation, `unmask` to undo the effect of `mask`, `link` to add a unit file to the search path, `revert` to restore unit files to their vendor versions, `add-wants/add-requires` to add dependencies to a target, and `edit` to modify unit files using drop-in snippets or full replacements.