1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2012 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="localectl" conditional='ENABLE_LOCALED'>
27 <title>localectl</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>localectl</refentrytitle>
42 <manvolnum>1</manvolnum>
46 <refname>localectl</refname>
47 <refpurpose>Control the system locale and keyboard layout settings</refpurpose>
52 <command>localectl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg></command>
57 <title>Description</title>
59 <para><command>localectl</command> may be used to
60 query and change the system locale and keyboard layout
63 <para>The system locale controls the language settings
64 of system services and of the UI before the user logs
65 in, such as the display manager, as well as the
66 default for users after login.</para>
68 <para>The keyboard settings control the keyboard
69 layout used on the text console and of the graphical
70 UI before the user logs in, such as the display
71 manager, as well as the default for users after
76 <title>Options</title>
78 <para>The following options are understood:</para>
82 <term><option>-h</option></term>
83 <term><option>--help</option></term>
85 <listitem><para>Prints a short help
86 text and exits.</para></listitem>
90 <term><option>--version</option></term>
92 <listitem><para>Prints a short version
93 string and exits.</para></listitem>
97 <term><option>--no-pager</option></term>
99 <listitem><para>Do not pipe output into a
100 pager.</para></listitem>
104 <term><option>--no-ask-password</option></term>
106 <listitem><para>Don't query the user
107 for authentication for privileged
108 operations.</para></listitem>
112 <term><option>-P</option></term>
113 <term><option>--privileged</option></term>
115 <listitem><para>Acquire privileges via PolicyKit
116 before executing the operation.</para></listitem>
120 <term><option>-H</option></term>
121 <term><option>--host</option></term>
123 <listitem><para>Execute the operation
124 remotely. Specify a hostname, or
125 username and hostname separated by @,
126 to connect to. This will use SSH to
128 system.</para></listitem>
132 <term><option>--no-convert</option></term>
135 <command>set-keymap</command> or
136 <command>set-x11-keymap</command> is
137 invoked and this option is passed then
138 the keymap will not be converted from
139 the console to X11, or X11 to console,
140 respectively.</para></listitem>
144 <para>The following commands are understood:</para>
148 <term><command>status</command></term>
150 <listitem><para>Show current settings
151 of the system locale and keyboard
152 mapping.</para></listitem>
156 <term><command>set-locale LOCALE...</command></term>
158 <listitem><para>Set the system
159 locale. This takes one or more
160 assignments such as "LANG=de_DE.utf8",
161 "LC_MESSAGES=en_GB.utf8", and so
163 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
164 for details on the available settings
165 and their meanings. Use
166 <command>list-locales</command> for a
167 list of available locales (see below).
172 <term><command>list-locales</command></term>
174 <listitem><para>List available locales
175 useful for configuration with
176 <command>set-locale</command>.</para></listitem>
180 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
182 <listitem><para>Set the system
183 keyboard mapping for the console. This
184 takes a keyboard mapping name (such as
185 "de" or "us"), and possibly a second
186 one to define a toggle keyboard
188 <option>--no-convert</option> is
189 passed the selected setting is also
190 applied to the default keyboard
191 mapping of X11, after converting it to
192 the closest matching X11 keyboard
194 <command>list-keymaps</command> for a
195 list of available keyboard mappings
196 (see below).</para></listitem>
200 <term><command>list-keymaps</command></term>
202 <listitem><para>List available
203 keyboard mappings for the console,
204 useful for configuration with
205 <command>set-keymap</command>.</para></listitem>
209 <term><command>set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</command></term>
211 <listitem><para>Set the system default
212 keyboard mapping for X11. This takes a
213 keyboard mapping name (such as "de" or
214 "us"), and possibly a model, variant
216 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
218 <option>--no-convert</option> is
219 passed the selected setting is also
220 applied to the system console keyboard
221 mapping, after converting it to the
222 closest matching console keyboard
223 mapping.</para></listitem>
227 <term><command>list-x11-keymap-models</command></term>
228 <term><command>list-x11-keymap-layouts</command></term>
229 <term><command>list-x11-keymap-variants [LAYOUT]</command></term>
230 <term><command>list-x11-keymap-options</command></term>
232 <listitem><para>List available X11
233 keymap models, layouts, variants and
234 options, useful for configuration with
235 <command>set-keymap</command>. The
237 <command>list-x11-keymap-variants</command>
238 optionally takes a layout parameter to
239 limit the output to the variants
240 suitable for the specific
241 layout.</para></listitem>
248 <title>Exit status</title>
250 <para>On success 0 is returned, a non-zero failure
251 code otherwise.</para>
255 <title>Environment</title>
257 <variablelist class='environment-variables'>
259 <term><varname>$SYSTEMD_PAGER</varname></term>
260 <listitem><para>Pager to use when
261 <option>--no-pager</option> is not given;
262 overrides <varname>$PAGER</varname>. Setting
263 this to an empty string or the value
264 <literal>cat</literal> is equivalent to passing
265 <option>--no-pager</option>.</para></listitem>
271 <title>See Also</title>
273 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
274 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
275 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
276 <citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
277 <citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
278 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
279 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
280 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>