]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/localectl.xml
final v236 update (#7649)
[thirdparty/systemd.git] / man / localectl.xml
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">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7
8 This file is part of systemd.
9
10 Copyright 2012 Lennart Poettering
11
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 -->
25
26 <refentry id="localectl" conditional='ENABLE_LOCALED'
27 xmlns:xi="http://www.w3.org/2001/XInclude">
28
29 <refentryinfo>
30 <title>localectl</title>
31 <productname>systemd</productname>
32
33 <authorgroup>
34 <author>
35 <contrib>Developer</contrib>
36 <firstname>Lennart</firstname>
37 <surname>Poettering</surname>
38 <email>lennart@poettering.net</email>
39 </author>
40 </authorgroup>
41 </refentryinfo>
42
43 <refmeta>
44 <refentrytitle>localectl</refentrytitle>
45 <manvolnum>1</manvolnum>
46 </refmeta>
47
48 <refnamediv>
49 <refname>localectl</refname>
50 <refpurpose>Control the system locale and keyboard layout settings</refpurpose>
51 </refnamediv>
52
53 <refsynopsisdiv>
54 <cmdsynopsis>
55 <command>localectl</command>
56 <arg choice="opt" rep="repeat">OPTIONS</arg>
57 <arg choice="req">COMMAND</arg>
58 </cmdsynopsis>
59 </refsynopsisdiv>
60
61 <refsect1>
62 <title>Description</title>
63
64 <para><command>localectl</command> may be used to query and change
65 the system locale and keyboard layout settings. It communicates with
66 <citerefentry><refentrytitle>systemd-localed</refentrytitle><manvolnum>8</manvolnum></citerefentry>
67 to modify files such as <filename>/etc/locale.conf</filename> and
68 <filename>/etc/vconsole.conf</filename>.</para>
69
70 <para>The system locale controls the language settings of system
71 services and of the UI before the user logs in, such as the
72 display manager, as well as the default for users after
73 login.</para>
74
75 <para>The keyboard settings control the keyboard layout used on
76 the text console and of the graphical UI before the user logs in,
77 such as the display manager, as well as the default for users
78 after login.</para>
79
80 <para>Note that the changes performed using this tool might require
81 the initramfs to be rebuilt to take effect during early system boot.
82 The initramfs is not rebuilt automatically by <filename>localectl</filename>.
83 </para>
84
85 <para>Note that
86 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
87 may be used to initialize the system locale for mounted (but not booted)
88 system images.</para>
89 </refsect1>
90
91 <refsect1>
92 <title>Options</title>
93
94 <para>The following options are understood:</para>
95
96 <variablelist>
97 <varlistentry>
98 <term><option>--no-ask-password</option></term>
99
100 <listitem><para>Do not query the user for authentication for
101 privileged operations.</para></listitem>
102 </varlistentry>
103
104 <varlistentry>
105 <term><option>--no-convert</option></term>
106
107 <listitem><para>If <command>set-keymap</command> or
108 <command>set-x11-keymap</command> is invoked and this option
109 is passed, then the keymap will not be converted from the
110 console to X11, or X11 to console,
111 respectively.</para></listitem>
112 </varlistentry>
113
114 <xi:include href="user-system-options.xml" xpointer="host" />
115 <xi:include href="user-system-options.xml" xpointer="machine" />
116
117 <xi:include href="standard-options.xml" xpointer="help" />
118 <xi:include href="standard-options.xml" xpointer="version" />
119 <xi:include href="standard-options.xml" xpointer="no-pager" />
120 </variablelist>
121
122 <para>The following commands are understood:</para>
123
124 <variablelist>
125 <varlistentry>
126 <term><command>status</command></term>
127
128 <listitem><para>Show current settings of the system locale and
129 keyboard mapping.</para></listitem>
130 </varlistentry>
131
132 <varlistentry>
133 <term><command>set-locale LOCALEā€¦</command></term>
134
135 <listitem><para>Set the system locale. This takes one or more
136 assignments such as "LANG=de_DE.utf8",
137 "LC_MESSAGES=en_GB.utf8", and so on. See
138 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
139 for details on the available settings and their meanings. Use
140 <command>list-locales</command> for a list of available
141 locales (see below). </para></listitem>
142 </varlistentry>
143
144 <varlistentry>
145 <term><command>list-locales</command></term>
146
147 <listitem><para>List available locales useful for
148 configuration with
149 <command>set-locale</command>.</para></listitem>
150 </varlistentry>
151
152 <varlistentry>
153 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
154
155 <listitem><para>Set the system keyboard mapping for the
156 console and X11. This takes a mapping name (such as "de" or
157 "us"), and possibly a second one to define a toggle keyboard
158 mapping. Unless <option>--no-convert</option> is passed, the
159 selected setting is also applied as the default system
160 keyboard mapping of X11, after converting it to the closest
161 matching X11 keyboard mapping. Use
162 <command>list-keymaps</command> for a list of available
163 keyboard mappings (see below).</para></listitem>
164 </varlistentry>
165
166 <varlistentry>
167 <term><command>list-keymaps</command></term>
168
169 <listitem><para>List available keyboard mappings for the
170 console, useful for configuration with
171 <command>set-keymap</command>.</para></listitem>
172 </varlistentry>
173
174 <varlistentry>
175 <term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
176
177 <listitem><para>Set the system default keyboard mapping for
178 X11 and the virtual console. This takes a keyboard mapping
179 name (such as <literal>de</literal> or <literal>us</literal>),
180 and possibly a model, variant, and options, see
181 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
182 for details. Unless <option>--no-convert</option> is passed,
183 the selected setting is also applied as the system console
184 keyboard mapping, after converting it to the closest matching
185 console keyboard mapping.</para></listitem>
186 </varlistentry>
187
188 <varlistentry>
189 <term><command>list-x11-keymap-models</command></term>
190 <term><command>list-x11-keymap-layouts</command></term>
191 <term><command>list-x11-keymap-variants [LAYOUT]</command></term>
192 <term><command>list-x11-keymap-options</command></term>
193
194 <listitem><para>List available X11 keymap models, layouts,
195 variants and options, useful for configuration with
196 <command>set-keymap</command>. The command
197 <command>list-x11-keymap-variants</command> optionally takes a
198 layout parameter to limit the output to the variants suitable
199 for the specific layout.</para></listitem>
200 </varlistentry>
201 </variablelist>
202
203 </refsect1>
204
205 <refsect1>
206 <title>Exit status</title>
207
208 <para>On success, 0 is returned, a non-zero failure code
209 otherwise.</para>
210 </refsect1>
211
212 <xi:include href="less-variables.xml" />
213
214 <refsect1>
215 <title>See Also</title>
216 <para>
217 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
218 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
219 <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
220 <citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
221 <citerefentry project='mankier'><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
222 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
223 <ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
224 The XKB Configuration Guide
225 </ulink>,
226 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
227 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
228 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
229 <citerefentry project='die-net'><refentrytitle>mkinitrd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
230 </para>
231 </refsect1>
232
233 </refentry>