Home Explore Blog CI



man-pages

26th chunk of `systemctl.man`
ee93c5df75e82d60536441193a8e9bedd6a59e6466f197460000000100000fa1
 of a unit is one that is invoked by the manager to induce state changes of it. For example, all processes started due to the
           ExecStartPre=, ExecStop= or ExecReload= settings of service units are control processes. Note that there is only one control process per unit at a time, as only one state change is executed at a time. For services
           of type Type=forking, the initial process started by the manager for ExecStart= is a control process, while the process ultimately forked off by that one is then considered the main process of the unit (if it can
           be determined). This is different for service units of other types, where the process forked off by the manager for ExecStart= is always the main process itself. A service unit consists of zero or one main
           process, zero or one control process plus any number of additional processes. Not all unit types manage processes of these types however. For example, for mount units, control processes are defined (which are the
           invocations of /bin/mount and /bin/umount), but no main process is defined. If omitted, defaults to all.

       -s, --signal=
           When used with kill, choose which signal to send to selected processes. Must be one of the well-known signal specifiers such as SIGTERM, SIGINT or SIGSTOP. If omitted, defaults to SIGTERM.

           The special value "help" will list the known values and the program will exit immediately, and the special value "list" will list known values along with the numerical signal numbers and the program will exit
           immediately.

       --what=
           Select what type of per-unit resources to remove when the clean command is invoked, see below. Takes one of configuration, state, cache, logs, runtime to select the type of resource. This option may be specified
           more than once, in which case all specified resource types are removed. Also accepts the special value all as a shortcut for specifying all five resource types. If this option is not specified defaults to the
           combination of cache and runtime, i.e. the two kinds of resources that are generally considered to be redundant and can be reconstructed on next invocation.

       -f, --force
           When used with enable, overwrite any existing conflicting symlinks.

           When used with edit, create all of the specified units which do not already exist.

           When used with halt, poweroff, reboot or kexec, execute the selected operation without shutting down all units. However, all processes will be killed forcibly and all file systems are unmounted or remounted
           read-only. This is hence a drastic but relatively safe option to request an immediate reboot. If --force is specified twice for these operations (with the exception of kexec), they will be executed immediately,
           without terminating any processes or unmounting any file systems. Warning: specifying --force twice with any of these operations might result in data loss. Note that when --force is specified twice the selected
           operation is executed by systemctl itself, and the system manager is not contacted. This means the command should succeed even when the system manager has crashed.

       --message=
           When used with halt, poweroff or reboot, set a short message explaining the reason for the operation. The message will be logged together with the default shutdown message.

       --now
           When used with enable, the units will also be started. When used with disable or mask, the units will also be stopped. The start or stop operation is only carried out when the respective enable or disable
           operation has been successful.

       --root=
           When used with enable/disable/is-enabled (and related commands), use the specified root path when looking for unit files. If this option is present, systemctl will operate on the file system directly, instead of
           communicating with

Title: systemctl Options: Signal Handling, Resource Cleaning, and Forced Operations
Summary
This section describes options for specifying signals with `--signal`, cleaning resources with `--what`, forcing actions with `--force`, setting shutdown messages with `--message`, enabling/disabling and starting/stopping units with `--now`, and specifying the root path for unit files with `--root`.