2
.\" Title: systemd-inhibit
3
.\" Author: Lennart Poettering <lennart@poettering.net>
4
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
6
.\" Manual: systemd-inhibit
10
.TH "SYSTEMD\-INHIBIT" "1" "" "systemd" "systemd-inhibit"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
25
.\" disable justification (adjust text to left margin only)
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
31
systemd-inhibit \- Execute a program with an inhibition lock taken
33
.HP \w'\fBsystemd\-inhibit\ \fR\fB[OPTIONS...]\fR\fB\ \fR\fB[COMMAND]\fR\fB\ \fR\fB[ARGUMENTS...]\fR\ 'u
34
\fBsystemd\-inhibit \fR\fB[OPTIONS...]\fR\fB \fR\fB[COMMAND]\fR\fB \fR\fB[ARGUMENTS...]\fR
35
.HP \w'\fBsystemd\-inhibit\ \fR\fB[OPTIONS...]\fR\fB\ \-\-list\fR\ 'u
36
\fBsystemd\-inhibit \fR\fB[OPTIONS...]\fR\fB \-\-list\fR
39
\fBsystemd\-inhibit\fR
40
may be used to execute a program with a shutdown, sleep or idle inhibitor lock taken\&. The lock will be acquired before the specified command line is executed and released afterwards\&.
42
Inhibitor locks may be used to block or delay system sleep and shutdown requests from the user, as well as automatic idle handling of the OS\&. This is useful to avoid system suspends while an optical disc is being recorded, or similar operations that should not be interrupted\&.
44
For more information see the
45
\m[blue]\fBInhibitor Lock Developer Documentation\fR\m[]\&\s-2\u[1]\d\s+2\&.
48
The following options are understood:
50
\fB\-h\fR, \fB\-\-help\fR
52
Prints a short help text and exits\&.
57
Prints a short version string and exits\&.
62
Takes a colon separated list of one or more operations to inhibit:
68
handle\-hibernate\-key,
69
handle\-lid\-switch, for inhibiting reboot/power\-off/halt/kexec, suspending/hibernating, the automatic idle detection, or the low\-level handling of the power/sleep key and the lid switch, respectively\&. If omitted, defaults to
70
idle:sleep:shutdown\&.
75
Takes a short human readable descriptive string for the program taking the lock\&. If not passed defaults to the command line string\&.
80
Takes a short human readable descriptive string for the reason for taking the lock\&. Defaults to "Unknown reason"\&.
89
and describes how the lock is applied\&. If
91
is used (the default), the lock prohibits any of the requested operations without time limit, and only privileged users may override it\&. If
93
is used, the lock can only delay the requested operations for a limited time\&. If the time elapses the lock is ignored and the operation executed\&. The time limit may be specified in
94
\fBsystemd-logind.conf\fR(5)\&. Note that
104
Lists all active inhibition locks instead of acquiring one\&.
108
Returns the exit status of the executed program\&.
115
# systemd\-inhibit wodim foobar\&.iso
121
This burns the ISO image
124
\fBwodim\fR(1), and inhibits system sleeping, shutdown and idle while doing so\&.
129
\fBsystemd-logind.conf\fR(5)
132
Inhibitor Lock Developer Documentation
134
\%http://www.freedesktop.org/wiki/Software/systemd/inhibit