File: loginctl.html

package info (click to toggle)
systemd 215-17
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 49,568 kB
  • sloc: ansic: 192,789; xml: 39,586; sh: 13,002; makefile: 4,700; perl: 1,461; python: 1,355
file content (222 lines) | stat: -rw-r--r-- 25,111 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>loginctl</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="loginctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>loginctl — Control the systemd login manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">loginctl</code>  [OPTIONS...] {COMMAND} [NAME...]</p></div></div><div class="refsect1"><a name="idm214184892112"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>loginctl</strong></span> may be used to
                introspect and control the state of the
                <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                login manager <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm214184888608"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend">¶</a></dt><dd><p>Do not print the legend,
                                        i.e. the column headers and
                                        the footer.</p></dd><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password">¶</a></dt><dd><p>Do not query the user
                                for authentication for privileged
                                operations.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--property=</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>When showing
                                session/user/seat properties, limit
                                display to certain properties as
                                specified as argument. If not
                                specified, all set properties are
                                shown. The argument should be a
                                property name, such as
                                "<code class="literal">Sessions</code>". If
                                specified more than once, all
                                properties with the specified names
                                are shown.</p></dd><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--all</code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p>When showing
                                session/user/seat properties, show all
                                properties regardless of whether they are
                                set or not.</p></dd><dt id="-l"><span class="term"><code class="option">-l</code>, </span><span class="term"><code class="option">--full</code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p>Do not ellipsize
                                process tree entries.</p></dd><dt id="--kill-who="><span class="term"><code class="option">--kill-who=</code></span><a class="headerlink" title="Permalink to this term" href="#--kill-who=">¶</a></dt><dd><p>When used with
                                <span class="command"><strong>kill-session</strong></span>,
                                choose which processes to kill. Must
                                be one of <code class="option">leader</code>, or
                                <code class="option">all</code> to select whether
                                to kill only the leader process of the
                                session or all processes of the
                                session. If omitted, defaults to
                                <code class="option">all</code>.</p></dd><dt id="-s"><span class="term"><code class="option">-s</code>, </span><span class="term"><code class="option">--signal=</code></span><a class="headerlink" title="Permalink to this term" href="#-s">¶</a></dt><dd><p>When used with
                                <span class="command"><strong>kill-session</strong></span> or
                                <span class="command"><strong>kill-user</strong></span>, choose
                                which signal to send to selected
                                processes. Must be one of the well
                                known signal specifiers, such as
                                <code class="constant">SIGTERM</code>,
                                <code class="constant">SIGINT</code> or
                                <code class="constant">SIGSTOP</code>. If
                                omitted, defaults to
                                <code class="constant">SIGTERM</code>.</p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#-H">¶</a></dt><dd><p><a name="host-text"></a>Execute the operation remotely. Specify a hostname, or a
      username and hostname separated by "<code class="literal">@</code>", to
      connect to. The hostname may optionally be suffixed by a
      container name, separated by "<code class="literal">:</code>", which
      connects directly to a specific container on the specified
      host. This will use SSH to talk to the remote machine manager
      instance. Container names may be enumerated with
      <span class="command"><strong>machinectl -H
      <em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
      container name to connect to.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list-sessions"><span class="term"><span class="command"><strong>list-sessions</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-sessions">¶</a></dt><dd><p>List current sessions.</p></dd><dt id="session-status ID..."><span class="term"><span class="command"><strong>session-status</strong></span> <em class="replaceable"><code>ID</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#session-status%20ID...">¶</a></dt><dd><p>Show terse runtime
                                status information about one or more
                                sessions. This function is intended to
                                generate human-readable output. If you
                                are looking for computer-parsable
                                output, use
                                <span class="command"><strong>show-session</strong></span>
                                instead.</p></dd><dt id="show-session ID..."><span class="term"><span class="command"><strong>show-session</strong></span> [<span class="optional"><em class="replaceable"><code>ID</code></em>...</span>]</span><a class="headerlink" title="Permalink to this term" href="#show-session%20ID...">¶</a></dt><dd><p>Show properties of one
                                or more sessions or the manager
                                itself. If no argument is specified,
                                properties of the manager will be
                                shown. If a session ID is specified,
                                properties of the session are shown. By
                                default, empty properties are
                                suppressed. Use <code class="option">--all</code>
                                to show those too. To select specific
                                properties to show, use
                                <code class="option">--property=</code>. This
                                command is intended to be used
                                whenever computer-parsable output is
                                required. Use
                                <span class="command"><strong>session-status</strong></span> if
                                you are looking for formatted
                                human-readable
                                output.</p></dd><dt id="activate ID..."><span class="term"><span class="command"><strong>activate</strong></span> <em class="replaceable"><code>ID</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#activate%20ID...">¶</a></dt><dd><p>Activate one or more
                                sessions. This brings one or more
                                sessions into the foreground, if
                                another session is currently in the
                                foreground on the respective
                                seat.</p></dd><dt id="lock-session ID..."><span class="term"><span class="command"><strong>lock-session</strong></span> <em class="replaceable"><code>ID</code></em>..., </span><span class="term"><span class="command"><strong>unlock-session</strong></span> <em class="replaceable"><code>ID</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#lock-session%20ID...">¶</a></dt><dd><p>Activates/deactivates
                                the screen lock on one or more
                                sessions, if the session supports it.
                                </p></dd><dt id="lock-sessions"><span class="term"><span class="command"><strong>lock-sessions</strong></span>, </span><span class="term"><span class="command"><strong>unlock-sessions</strong></span></span><a class="headerlink" title="Permalink to this term" href="#lock-sessions">¶</a></dt><dd><p>Activates/deactivates
                                the screen lock on all current
                                sessions supporting it.
                                </p></dd><dt id="terminate-session ID..."><span class="term"><span class="command"><strong>terminate-session</strong></span> <em class="replaceable"><code>ID</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#terminate-session%20ID...">¶</a></dt><dd><p>Terminates a session.
                                This kills all processes of the
                                session and deallocates all resources
                                attached to the session.
                                </p></dd><dt id="kill-session ID..."><span class="term"><span class="command"><strong>kill-session</strong></span> <em class="replaceable"><code>ID</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#kill-session%20ID...">¶</a></dt><dd><p>Send a signal to one
                                or more processes of the session. Use
                                <code class="option">--kill-who=</code> to select
                                which process to kill. Use
                                <code class="option">--signal=</code> to select
                                the signal to send.</p></dd><dt id="list-users"><span class="term"><span class="command"><strong>list-users</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-users">¶</a></dt><dd><p>List currently logged
                                in users.</p></dd><dt id="user-status USER..."><span class="term"><span class="command"><strong>user-status</strong></span> <em class="replaceable"><code>USER</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#user-status%20USER...">¶</a></dt><dd><p>Show terse runtime
                                status information about one or more
                                logged in users. This function is
                                intended to generate human-readable
                                output. If you are looking for
                                computer-parsable output, use
                                <span class="command"><strong>show-user</strong></span> instead.
                                Users may be specified by their
                                usernames or numeric user IDs.
                                </p></dd><dt id="show-user USER..."><span class="term"><span class="command"><strong>show-user</strong></span> [<span class="optional"><em class="replaceable"><code>USER</code></em>...</span>]</span><a class="headerlink" title="Permalink to this term" href="#show-user%20USER...">¶</a></dt><dd><p>Show properties of one
                                or more users or the manager
                                itself. If no argument is specified,
                                properties of the manager will be
                                shown. If a user is specified,
                                properties of the user are shown. By
                                default, empty properties are
                                suppressed. Use <code class="option">--all</code>
                                to show those too. To select specific
                                properties to show, use
                                <code class="option">--property=</code>. This
                                command is intended to be used
                                whenever computer-parsable output is
                                required. Use
                                <span class="command"><strong>user-status</strong></span> if
                                you are looking for formatted
                                human-readable
                                output.</p></dd><dt id="enable-linger USER..."><span class="term"><span class="command"><strong>enable-linger</strong></span> <em class="replaceable"><code>USER</code></em>..., </span><span class="term"><span class="command"><strong>disable-linger</strong></span> <em class="replaceable"><code>USER</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#enable-linger%20USER...">¶</a></dt><dd><p>Enable/disable user
                                lingering for one or more users. If
                                enabled for a specific user, a user
                                manager is spawned for the user at
                                boot and kept around after
                                logouts. This allows users who are not
                                logged in to run long-running
                                services.</p></dd><dt id="terminate-user USER..."><span class="term"><span class="command"><strong>terminate-user</strong></span> <em class="replaceable"><code>USER</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#terminate-user%20USER...">¶</a></dt><dd><p>Terminates all
                                sessions of a user. This kills all
                                processes of all sessions of the user
                                and deallocates all runtime resources
                                attached to the user.
                                </p></dd><dt id="kill-user USER..."><span class="term"><span class="command"><strong>kill-user</strong></span> <em class="replaceable"><code>USER</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#kill-user%20USER...">¶</a></dt><dd><p>Send a signal to all
                                processes of a user. Use
                                <code class="option">--signal=</code> to select
                                the signal to send.</p></dd><dt id="list-seats"><span class="term"><span class="command"><strong>list-seats</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list-seats">¶</a></dt><dd><p>List currently
                                available seats on the local
                                system.</p></dd><dt id="seat-status NAME..."><span class="term"><span class="command"><strong>seat-status</strong></span> <em class="replaceable"><code>NAME</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#seat-status%20NAME...">¶</a></dt><dd><p>Show terse runtime
                                status information about one or more
                                seats. This function is
                                intended to generate human-readable
                                output. If you are looking for
                                computer-parsable output, use
                                <span class="command"><strong>show-seat</strong></span>
                                instead.</p></dd><dt id="show-seat NAME..."><span class="term"><span class="command"><strong>show-seat</strong></span> <em class="replaceable"><code>NAME</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#show-seat%20NAME...">¶</a></dt><dd><p>Show properties of one
                                or more seats or the manager
                                itself. If no argument is specified,
                                properties of the manager will be
                                shown. If a seat is specified,
                                properties of the seat are shown. By
                                default, empty properties are
                                suppressed. Use <code class="option">--all</code>
                                to show those too. To select specific
                                properties to show, use
                                <code class="option">--property=</code>. This
                                command is intended to be used
                                whenever computer-parsable output is
                                required. Use
                                <span class="command"><strong>seat-status</strong></span> if you
                                are looking for formatted
                                human-readable
                                output.</p></dd><dt id="attach NAME DEVICE..."><span class="term"><span class="command"><strong>attach</strong></span> <em class="replaceable"><code>NAME</code></em> <em class="replaceable"><code>DEVICE</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#attach%20NAME%20DEVICE...">¶</a></dt><dd><p>Persistently attach
                                one or more devices to a seat. The
                                devices should be specified via device
                                paths in the <code class="filename">/sys</code>
                                file system. To create a new seat,
                                attach at least one graphics card to a
                                previously unused seat name. Seat
                                names may consist only of a-z, A-Z,
                                0-9, "<code class="literal">-</code>" and
                                "<code class="literal">_</code>" and must be
                                prefixed with "<code class="literal">seat</code>".
                                To drop assignment of a device to a
                                specific seat, just reassign it to a
                                different seat, or use
                                <span class="command"><strong>flush-devices</strong></span>.
                                </p></dd><dt id="flush-devices"><span class="term"><span class="command"><strong>flush-devices</strong></span></span><a class="headerlink" title="Permalink to this term" href="#flush-devices">¶</a></dt><dd><p>Removes all device
                                assignments previously created with
                                <span class="command"><strong>attach</strong></span>. After this
                                call, only automatically generated
                                seats will remain, and all seat
                                hardware is assigned to
                                them.</p></dd><dt id="terminate-seat NAME..."><span class="term"><span class="command"><strong>terminate-seat</strong></span> <em class="replaceable"><code>NAME</code></em>...</span><a class="headerlink" title="Permalink to this term" href="#terminate-seat%20NAME...">¶</a></dt><dd><p>Terminates all
                                sessions on a seat. This kills all
                                processes of all sessions on the seat
                                and deallocates all runtime resources
                                attached to them.</p></dd></dl></div></div><div class="refsect1"><a name="idm214183768240"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned, a non-zero failure
                code otherwise.</p></div><div class="refsect1"><a name="idm214172220528"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                        <code class="option">--no-pager</code> is not given;
                        overrides <code class="varname">$PAGER</code>.  Setting
                        this to an empty string or the value
                        "<code class="literal">cat</code>" is equivalent to passing
                        <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                        options passed to
                        <span class="command"><strong>less</strong></span>
                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214183766592"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                        <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
                        <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
                        <a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a>
                </p></div></div></body></html>