]> git.proxmox.com Git - systemd.git/blob - man/loginctl.html
Imported Upstream version 217
[systemd.git] / man / loginctl.html
1 <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>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 217</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="idm214194113152"></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
23 introspect and control the state of the
24 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
25 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="idm214194109600"></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,
26 i.e. the column headers and
27 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
28 for authentication for privileged
29 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
30 session/user/seat properties, limit
31 display to certain properties as
32 specified as argument. If not
33 specified, all set properties are
34 shown. The argument should be a
35 property name, such as
36 "<code class="literal">Sessions</code>". If
37 specified more than once, all
38 properties with the specified names
39 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
40 session/user/seat properties, show all
41 properties regardless of whether they are
42 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
43 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
44 <span class="command"><strong>kill-session</strong></span>,
45 choose which processes to kill. Must
46 be one of <code class="option">leader</code>, or
47 <code class="option">all</code> to select whether
48 to kill only the leader process of the
49 session or all processes of the
50 session. If omitted, defaults to
51 <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
52 <span class="command"><strong>kill-session</strong></span> or
53 <span class="command"><strong>kill-user</strong></span>, choose
54 which signal to send to selected
55 processes. Must be one of the well
56 known signal specifiers, such as
57 <code class="constant">SIGTERM</code>,
58 <code class="constant">SIGINT</code> or
59 <code class="constant">SIGSTOP</code>. If
60 omitted, defaults to
61 <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
62 username and hostname separated by "<code class="literal">@</code>", to
63 connect to. The hostname may optionally be suffixed by a
64 container name, separated by "<code class="literal">:</code>", which
65 connects directly to a specific container on the specified
66 host. This will use SSH to talk to the remote machine manager
67 instance. Container names may be enumerated with
68 <span class="command"><strong>machinectl -H
69 <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
70 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.
71 </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
72 status information about one or more
73 sessions. This function is intended to
74 generate human-readable output. If you
75 are looking for computer-parsable
76 output, use
77 <span class="command"><strong>show-session</strong></span>
78 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
79 or more sessions or the manager
80 itself. If no argument is specified,
81 properties of the manager will be
82 shown. If a session ID is specified,
83 properties of the session are shown. By
84 default, empty properties are
85 suppressed. Use <code class="option">--all</code>
86 to show those too. To select specific
87 properties to show, use
88 <code class="option">--property=</code>. This
89 command is intended to be used
90 whenever computer-parsable output is
91 required. Use
92 <span class="command"><strong>session-status</strong></span> if
93 you are looking for formatted
94 human-readable
95 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
96 sessions. This brings one or more
97 sessions into the foreground, if
98 another session is currently in the
99 foreground on the respective
100 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
101 the screen lock on one or more
102 sessions, if the session supports it.
103 </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
104 the screen lock on all current
105 sessions supporting it.
106 </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.
107 This kills all processes of the
108 session and deallocates all resources
109 attached to the session.
110 </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
111 or more processes of the session. Use
112 <code class="option">--kill-who=</code> to select
113 which process to kill. Use
114 <code class="option">--signal=</code> to select
115 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
116 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
117 status information about one or more
118 logged in users. This function is
119 intended to generate human-readable
120 output. If you are looking for
121 computer-parsable output, use
122 <span class="command"><strong>show-user</strong></span> instead.
123 Users may be specified by their
124 usernames or numeric user IDs.
125 </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
126 or more users or the manager
127 itself. If no argument is specified,
128 properties of the manager will be
129 shown. If a user is specified,
130 properties of the user are shown. By
131 default, empty properties are
132 suppressed. Use <code class="option">--all</code>
133 to show those too. To select specific
134 properties to show, use
135 <code class="option">--property=</code>. This
136 command is intended to be used
137 whenever computer-parsable output is
138 required. Use
139 <span class="command"><strong>user-status</strong></span> if
140 you are looking for formatted
141 human-readable
142 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
143 lingering for one or more users. If
144 enabled for a specific user, a user
145 manager is spawned for the user at
146 boot and kept around after
147 logouts. This allows users who are not
148 logged in to run long-running
149 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
150 sessions of a user. This kills all
151 processes of all sessions of the user
152 and deallocates all runtime resources
153 attached to the user.
154 </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
155 processes of a user. Use
156 <code class="option">--signal=</code> to select
157 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
158 available seats on the local
159 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
160 status information about one or more
161 seats. This function is
162 intended to generate human-readable
163 output. If you are looking for
164 computer-parsable output, use
165 <span class="command"><strong>show-seat</strong></span>
166 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
167 or more seats or the manager
168 itself. If no argument is specified,
169 properties of the manager will be
170 shown. If a seat is specified,
171 properties of the seat are shown. By
172 default, empty properties are
173 suppressed. Use <code class="option">--all</code>
174 to show those too. To select specific
175 properties to show, use
176 <code class="option">--property=</code>. This
177 command is intended to be used
178 whenever computer-parsable output is
179 required. Use
180 <span class="command"><strong>seat-status</strong></span> if you
181 are looking for formatted
182 human-readable
183 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
184 one or more devices to a seat. The
185 devices should be specified via device
186 paths in the <code class="filename">/sys</code>
187 file system. To create a new seat,
188 attach at least one graphics card to a
189 previously unused seat name. Seat
190 names may consist only of a-z, A-Z,
191 0-9, "<code class="literal">-</code>" and
192 "<code class="literal">_</code>" and must be
193 prefixed with "<code class="literal">seat</code>".
194 To drop assignment of a device to a
195 specific seat, just reassign it to a
196 different seat, or use
197 <span class="command"><strong>flush-devices</strong></span>.
198 </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
199 assignments previously created with
200 <span class="command"><strong>attach</strong></span>. After this
201 call, only automatically generated
202 seats will remain, and all seat
203 hardware is assigned to
204 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
205 sessions on a seat. This kills all
206 processes of all sessions on the seat
207 and deallocates all runtime resources
208 attached to them.</p></dd></dl></div></div><div class="refsect1"><a name="idm214192990016"></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
209 code otherwise.</p></div><div class="refsect1"><a name="idm214178572016"></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
210 <code class="option">--no-pager</code> is not given;
211 overrides <code class="varname">$PAGER</code>. Setting
212 this to an empty string or the value
213 "<code class="literal">cat</code>" is equivalent to passing
214 <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
215 options passed to
216 <span class="command"><strong>less</strong></span>
217 ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm214192988368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
218 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
219 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
220 <a href="systemd-logind.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-logind.service</span>(8)</span></a>,
221 <a href="logind.conf.html"><span class="citerefentry"><span class="refentrytitle">logind.conf</span>(5)</span></a>
222 </p></div></div></body></html>