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 query and change
63 the system locale and keyboard layout settings.</para>
65 <para>The system locale controls the language settings of system
66 services and of the UI before the user logs in, such as the
67 display manager, as well as the default for users after
70 <para>The keyboard settings control the keyboard layout used on
71 the text console and of the graphical UI before the user logs in,
72 such as the display manager, as well as the default for users
76 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
77 to initialize the system locale for mounted (but not booted)
82 <title>Options</title>
84 <para>The following options are understood:</para>
88 <term><option>--no-ask-password</option></term>
90 <listitem><para>Do not query the user for authentication for
91 privileged operations.</para></listitem>
95 <term><option>--no-convert</option></term>
97 <listitem><para>If <command>set-keymap</command> or
98 <command>set-x11-keymap</command> is invoked and this option
99 is passed, then the keymap will not be converted from the
100 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 of the system locale and
118 keyboard mapping.</para></listitem>
122 <term><command>set-locale LOCALE...</command></term>
124 <listitem><para>Set the system locale. This takes one or more
125 assignments such as "LANG=de_DE.utf8",
126 "LC_MESSAGES=en_GB.utf8", and so on. See
127 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
128 for details on the available settings and their meanings. Use
129 <command>list-locales</command> for a list of available
130 locales (see below). </para></listitem>
134 <term><command>list-locales</command></term>
136 <listitem><para>List available locales useful for
138 <command>set-locale</command>.</para></listitem>
142 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
144 <listitem><para>Set the system keyboard mapping for the
145 console and X11. This takes a mapping name (such as "de" or
146 "us"), and possibly a second one to define a toggle keyboard
147 mapping. Unless <option>--no-convert</option> is passed, the
148 selected setting is also applied as the default system
149 keyboard mapping of X11, after converting it to the closest
150 matching X11 keyboard mapping. Use
151 <command>list-keymaps</command> for a list of available
152 keyboard mappings (see below).</para></listitem>
156 <term><command>list-keymaps</command></term>
158 <listitem><para>List available keyboard mappings for the
159 console, useful for configuration with
160 <command>set-keymap</command>.</para></listitem>
164 <term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
166 <listitem><para>Set the system default keyboard mapping for
167 X11 and the virtual console. This takes a keyboard mapping
168 name (such as <literal>de</literal> or <literal>us</literal>),
169 and possibly a model, variant, and options, see
170 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
171 for details. Unless <option>--no-convert</option> is passed,
172 the selected setting is also applied as the system console
173 keyboard mapping, after converting it to the closest matching
174 console keyboard mapping.</para></listitem>
178 <term><command>list-x11-keymap-models</command></term>
179 <term><command>list-x11-keymap-layouts</command></term>
180 <term><command>list-x11-keymap-variants [LAYOUT]</command></term>
181 <term><command>list-x11-keymap-options</command></term>
183 <listitem><para>List available X11 keymap models, layouts,
184 variants and options, useful for configuration with
185 <command>set-keymap</command>. The command
186 <command>list-x11-keymap-variants</command> optionally takes a
187 layout parameter to limit the output to the variants suitable
188 for the specific layout.</para></listitem>
195 <title>Exit status</title>
197 <para>On success, 0 is returned, a non-zero failure code
201 <xi:include href="less-variables.xml" />
204 <title>See Also</title>
206 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
207 <citerefentry><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
208 <citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
209 <citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
210 <citerefentry><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
211 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
212 <ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
213 The XKB Configuration Guide
215 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
216 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
217 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>