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>--help</option></term>
83 <term><option>-h</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>-H</option></term>
113 <term><option>--host</option></term>
115 <listitem><para>Execute the operation
116 remotely. Specify a hostname, or
117 username and hostname separated by @,
118 to connect to. This will use SSH to
120 system.</para></listitem>
124 <term><option>--no-convert</option></term>
127 <command>set-keymap</command> or
128 <command>set-x11-keymap</command> is
129 invoked and this option is passed then
130 the keymap will not be converted from
131 the console to X11, or X11 to console,
132 respectively.</para></listitem>
136 <para>The following commands are understood:</para>
140 <term><command>status</command></term>
142 <listitem><para>Show current settings
143 of the system locale and keyboard
144 mapping.</para></listitem>
148 <term><command>set-locale LOCALE...</command></term>
150 <listitem><para>Set the system
151 locale. This takes one or more
152 assignments such as "LANG=de_DE.utf8",
153 "LC_MESSAGES=en_GB.utf8", and so
155 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
156 for details on the available settings
157 and their meanings. Use
158 <command>list-locales</command> for a
159 list of available locales (see below).
164 <term><command>list-locales</command></term>
166 <listitem><para>List available locales
167 useful for configuration with
168 <command>set-locale</command>.</para></listitem>
172 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
174 <listitem><para>Set the system
175 keyboard mapping for the console. This
176 takes a keyboard mapping name (such as
177 "de" or "us"), and possibly a second
178 one to define a toggle keyboard
180 <option>--no-convert</option> is
181 passed the selected setting is also
182 applied to the default keyboard
183 mapping of X11, after converting it to
184 the closest matching X11 keyboard
186 <command>list-keymaps</command> for a
187 list of available keyboard mappings
188 (see below).</para></listitem>
192 <term><command>list-keymaps</command></term>
194 <listitem><para>List available
195 keyboard mappings for the console,
196 useful for configuration with
197 <command>set-keymap</command>.</para></listitem>
201 <term><command>set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]</command></term>
203 <listitem><para>Set the system default
204 keyboard mapping for X11. This takes a
205 keyboard mapping name (such as "de" or
206 "us"), and possibly a model, variant
208 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
210 <option>--no-convert</option> is
211 passed the selected setting is also
212 applied to the system console keyboard
213 mapping, after converting it to the
214 closest matching console keyboard
215 mapping.</para></listitem>
223 <title>Exit status</title>
225 <para>On success 0 is returned, a non-zero failure
226 code otherwise.</para>
230 <title>Environment</title>
232 <variablelist class='environment-variables'>
234 <term><varname>$SYSTEMD_PAGER</varname></term>
235 <listitem><para>Pager to use when
236 <option>--no-pager</option> is not given;
237 overrides <varname>$PAGER</varname>. Setting
238 this to an empty string or the value
239 <literal>cat</literal> is equivalent to passing
240 <option>--no-pager</option>.</para></listitem>
246 <title>See Also</title>
248 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
249 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
250 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
251 <citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
252 <citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
253 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
254 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
255 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>