Home Explore Blog CI



man-pages

15th chunk of `systemctl.man`
5f3f0630ebcceccb8dffaa495fb8d6a5ddc87ecb0ba0b5c80000000100000fa3
 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 invoked on temporary files which will be written to the real location if the editor exits successfully.

           If --drop-in= is specified, the given drop-in file name will be used instead of the default override.conf.

           If --full is specified, this will copy the original units instead of creating drop-in files.

           If --force is specified and any units do not already exist, new unit files will be opened for editing.

           If --runtime is specified, the changes will be made temporarily in /run/ and they will be lost on the next reboot.

           If the temporary file is empty upon exit, the modification of the related unit is canceled.

           After the units have been edited, systemd configuration is reloaded (in a way that is equivalent to daemon-reload).

           Note that this command cannot be used to remotely edit units and that you cannot temporarily edit units which are in /etc/, since they take precedence over /run/.

       get-default
           Return the default target to boot into. This returns the target unit name default.target is aliased (symlinked) to.

       set-default TARGET
           Set the default target to boot into. This sets (symlinks) the default.target alias to the given target unit.

   Machine Commands
       list-machines [PATTERN...]
           List the host and all running local containers with their state. If one or more PATTERNs are specified, only containers matching one of them are shown.

   Job Commands
       list-jobs [PATTERN...]
           List jobs that are in progress. If one or more PATTERNs are specified, only jobs for units matching one of them are shown.

           When combined with --after or --before the list is augmented with information on which other job each job is waiting for, and which other jobs are waiting for it, see above.

       cancel [JOB...]
           Cancel one or more jobs specified on the command line by their numeric job IDs. If no job ID is specified, cancel all pending jobs.

   Environment Commands
       systemd supports an environment block that is passed to processes the manager spawns. The names of the variables can contain ASCII letters, digits, and the underscore character. Variable names cannot be empty or start
       with a digit. In variable values, most characters are allowed, but the whole sequence must be valid UTF-8. (Note that control characters like newline (NL), tab (TAB), or the escape character (ESC), are valid ASCII and
       thus valid UTF-8). The total length of the environment block is limited to _SC_ARG_MAX value defined by sysconf(3).

       show-environment
           Dump the systemd manager environment block. This is the environment block that is passed to all processes the manager spawns. The environment block will be dumped in straightforward form suitable for sourcing into
           most shells. If no special characters or whitespace is present in the variable values, no escaping is performed, and

Title: systemctl: edit, get-default, set-default, machine commands, job commands, and environment commands
Summary
This section details the `systemctl` commands `edit` for modifying unit files, `get-default` and `set-default` for managing the default boot target. It also covers commands for listing machines and their states (`list-machines`), listing and canceling jobs (`list-jobs`, `cancel`), and displaying the systemd manager environment block (`show-environment`).