1SYSTEMD-INHIBIT(1)              systemd-inhibit             SYSTEMD-INHIBIT(1)
2
3
4

NAME

6       systemd-inhibit - Execute a program with an inhibition lock taken
7

SYNOPSIS

9       systemd-inhibit [OPTIONS...] [COMMAND] [ARGUMENTS...]
10
11       systemd-inhibit [OPTIONS...] --list
12

DESCRIPTION

14       systemd-inhibit may be used to execute a program with a shutdown, sleep
15       or idle inhibitor lock taken. The lock will be acquired before the
16       specified command line is executed and released afterwards.
17
18       Inhibitor locks may be used to block or delay system sleep and shutdown
19       requests from the user, as well as automatic idle handling of the OS.
20       This is useful to avoid system suspends while an optical disc is being
21       recorded, or similar operations that should not be interrupted.
22
23       For more information see the Inhibitor Lock Developer Documentation[1].
24

OPTIONS

26       The following options are understood:
27
28       --what=
29           Takes a colon-separated list of one or more operations to inhibit:
30           "shutdown", "sleep", "idle", "handle-power-key",
31           "handle-suspend-key", "handle-hibernate-key", "handle-lid-switch",
32           for inhibiting reboot/power-off/halt/kexec, suspending/hibernating,
33           the automatic idle detection, or the low-level handling of the
34           power/sleep key and the lid switch, respectively. If omitted,
35           defaults to "idle:sleep:shutdown".
36
37       --who=
38           Takes a short, human-readable descriptive string for the program
39           taking the lock. If not passed, defaults to the command line
40           string.
41
42       --why=
43           Takes a short, human-readable descriptive string for the reason for
44           taking the lock. Defaults to "Unknown reason".
45
46       --mode=
47           Takes either "block" or "delay" and describes how the lock is
48           applied. If "block" is used (the default), the lock prohibits any
49           of the requested operations without time limit, and only privileged
50           users may override it. If "delay" is used, the lock can only delay
51           the requested operations for a limited time. If the time elapses,
52           the lock is ignored and the operation executed. The time limit may
53           be specified in logind.conf(5). Note that "delay" is only available
54           for "sleep" and "shutdown".
55
56       --list
57           Lists all active inhibition locks instead of acquiring one.
58
59       -h, --help
60           Print a short help text and exit.
61
62       --version
63           Print a short version string and exit.
64

EXIT STATUS

66       Returns the exit status of the executed program.
67

EXAMPLE

69           # systemd-inhibit wodim foobar.iso
70
71       This burns the ISO image foobar.iso on a CD using wodim(1), and
72       inhibits system sleeping, shutdown and idle while doing so.
73

SEE ALSO

75       systemd(1), logind.conf(5)
76

NOTES

78        1. Inhibitor Lock Developer Documentation
79           http://www.freedesktop.org/wiki/Software/systemd/inhibit
80
81
82
83systemd 219                                                 SYSTEMD-INHIBIT(1)
Impressum