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'
25 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
28 <title>localectl
</title>
29 <productname>systemd
</productname>
33 <contrib>Developer
</contrib>
34 <firstname>Lennart
</firstname>
35 <surname>Poettering
</surname>
36 <email>lennart@poettering.net
</email>
42 <refentrytitle>localectl
</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>localectl
</refname>
48 <refpurpose>Control the system locale and keyboard layout settings
</refpurpose>
53 <command>localectl
</command>
54 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
55 <arg choice=
"req">COMMAND
</arg>
60 <title>Description
</title>
62 <para><command>localectl
</command> may be used to
63 query and change the system locale and keyboard layout
66 <para>The system locale controls the language settings
67 of system services and of the UI before the user logs
68 in, such as the display manager, as well as the
69 default for users after login.
</para>
71 <para>The keyboard settings control the keyboard
72 layout used on the text console and of the graphical
73 UI before the user logs in, such as the display
74 manager, as well as the default for users after
79 <title>Options
</title>
81 <para>The following options are understood:
</para>
85 <term><option>--no-ask-password
</option></term>
87 <listitem><para>Do not query the user
88 for authentication for privileged
89 operations.
</para></listitem>
93 <term><option>--no-convert
</option></term>
96 <command>set-keymap
</command> or
97 <command>set-x11-keymap
</command> is
98 invoked and this option is passed, then
99 the keymap will not be converted from
100 the console to X11, or X11 to console,
101 respectively.
</para></listitem>
104 <xi:include href=
"user-system-options.xml" xpointer=
"host" />
106 <xi:include href=
"standard-options.xml" xpointer=
"help" />
107 <xi:include href=
"standard-options.xml" xpointer=
"version" />
108 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
111 <para>The following commands are understood:
</para>
115 <term><command>status
</command></term>
117 <listitem><para>Show current settings
118 of the system locale and keyboard
119 mapping.
</para></listitem>
123 <term><command>set-locale LOCALE...
</command></term>
125 <listitem><para>Set the system
126 locale. This takes one or more
127 assignments such as
"LANG=de_DE.utf8",
128 "LC_MESSAGES=en_GB.utf8", and so
130 <citerefentry><refentrytitle>locale
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
131 for details on the available settings
132 and their meanings. Use
133 <command>list-locales
</command> for a
134 list of available locales (see below).
139 <term><command>list-locales
</command></term>
141 <listitem><para>List available locales
142 useful for configuration with
143 <command>set-locale
</command>.
</para></listitem>
147 <term><command>set-keymap MAP [TOGGLEMAP]
</command></term>
149 <listitem><para>Set the system
150 keyboard mapping for the console. This
151 takes a keyboard mapping name (such as
152 "de" or
"us"), and possibly a second
153 one to define a toggle keyboard
155 <option>--no-convert
</option> is
156 passed, the selected setting is also
157 applied to the default keyboard
158 mapping of X11, after converting it to
159 the closest matching X11 keyboard
161 <command>list-keymaps
</command> for a
162 list of available keyboard mappings
163 (see below).
</para></listitem>
167 <term><command>list-keymaps
</command></term>
169 <listitem><para>List available
170 keyboard mappings for the console,
171 useful for configuration with
172 <command>set-keymap
</command>.
</para></listitem>
176 <term><command>set-x11-keymap LAYOUT [MODEL] [VARIANT] [OPTIONS]
</command></term>
178 <listitem><para>Set the system default
179 keyboard mapping for X11. This takes a
180 keyboard mapping name (such as
"de" or
181 "us"), and possibly a model, variant
183 <citerefentry><refentrytitle>kbd
</refentrytitle><manvolnum>4</manvolnum></citerefentry>
185 <option>--no-convert
</option> is
186 passed, the selected setting is also
187 applied to the system console keyboard
188 mapping, after converting it to the
189 closest matching console keyboard
190 mapping.
</para></listitem>
194 <term><command>list-x11-keymap-models
</command></term>
195 <term><command>list-x11-keymap-layouts
</command></term>
196 <term><command>list-x11-keymap-variants [LAYOUT]
</command></term>
197 <term><command>list-x11-keymap-options
</command></term>
199 <listitem><para>List available X11
200 keymap models, layouts, variants and
201 options, useful for configuration with
202 <command>set-keymap
</command>. The
204 <command>list-x11-keymap-variants
</command>
205 optionally takes a layout parameter to
206 limit the output to the variants
207 suitable for the specific
208 layout.
</para></listitem>
215 <title>Exit status
</title>
217 <para>On success,
0 is returned, a non-zero failure
218 code otherwise.
</para>
221 <xi:include href=
"less-variables.xml" />
224 <title>See Also
</title>
226 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
227 <citerefentry><refentrytitle>locale
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
228 <citerefentry><refentrytitle>locale.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
229 <citerefentry><refentrytitle>vconsole.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
230 <citerefentry><refentrytitle>loadkeys
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
231 <citerefentry><refentrytitle>kbd
</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
232 <ulink url=
"http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
233 The XKB Configuration Guide
235 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
236 <citerefentry><refentrytitle>systemd-localed.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>