Debian Codegraph @

man/localectl.xml

raw
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="localectl" conditional='ENABLE_LOCALED'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>localectl</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>localectl</refentrytitle>
16 <manvolnum>1</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>localectl</refname>
21 <refpurpose>Control the system locale and keyboard layout settings</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <cmdsynopsis>
26 <command>localectl</command>
27 <arg choice="opt" rep="repeat">OPTIONS</arg>
28 <arg choice="req">COMMAND</arg>
29 </cmdsynopsis>
30 </refsynopsisdiv>
31
32 <refsect1>
33 <title>Description</title>
34
35 <para><command>localectl</command> may be used to query and change
36 the system locale and keyboard layout settings. It communicates with
37 <citerefentry><refentrytitle>systemd-localed</refentrytitle><manvolnum>8</manvolnum></citerefentry>
38 to modify files such as <filename>/etc/locale.conf</filename> and
39 <filename>/etc/vconsole.conf</filename>.</para>
40
41 <para>The system locale controls the language settings of system
42 services and of the UI before the user logs in, such as the
43 display manager, as well as the default for users after
44 login.</para>
45
46 <para>The keyboard settings control the keyboard layout used on
47 the text console and of the graphical UI before the user logs in,
48 such as the display manager, as well as the default for users
49 after login.</para>
50
51 <para>Note that the changes performed using this tool might require the initrd to be rebuilt to take
52 effect during early system boot. The initrd is not rebuilt automatically by
53 <filename>localectl</filename>, this task has to be performed manually, usually by reinstalling the
54 distribution's kernel package.</para>
55
56 <para>Note that
57 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
58 may be used to initialize the system locale for mounted (but not booted)
59 system images.</para>
60 </refsect1>
61
62 <refsect1>
63 <title>Commands</title>
64
65 <para>The following commands are understood:</para>
66
67 <variablelist>
68 <varlistentry>
69 <term><command>status</command></term>
70
71 <listitem><para>Show current settings of the system locale and keyboard mapping.
72 If no command is specified, this is the implied default.</para>
73
74 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
75 </varlistentry>
76
77 <varlistentry>
78 <term><command>set-locale LOCALE</command></term>
79 <term><command>set-locale VARIABLE=LOCALE…</command></term>
80
81 <listitem><para>Set the system locale. This takes one locale such as <literal>en_US.UTF-8</literal>, or takes one or more
82 locale assignments such as <literal>LANG=de_DE.utf8</literal>, <literal>LC_MESSAGES=en_GB.utf8</literal>, and so on. If
83 one locale without variable name is provided, then <literal>LANG=</literal> locale variable will be set. See
84 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
85 for details on the available settings and their meanings. Use
86 <command>list-locales</command> for a list of available
87 locales (see below). </para>
88
89 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term><command>list-locales</command></term>
94
95 <listitem><para>List available locales useful for
96 configuration with
97 <command>set-locale</command>.</para>
98
99 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
100 </varlistentry>
101
102 <varlistentry>
103 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
104
105 <listitem><para>Set the system keyboard mapping for the
106 console and X11. This takes a mapping name (such as "de" or
107 "us"), and possibly a second one to define a toggle keyboard
108 mapping. Unless <option>--no-convert</option> is passed, the
109 selected setting is also applied as the default system
110 keyboard mapping of X11, after converting it to the closest
111 matching X11 keyboard mapping. Use
112 <command>list-keymaps</command> for a list of available
113 keyboard mappings (see below).</para>
114
115 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term><command>list-keymaps</command></term>
120
121 <listitem><para>List available keyboard mappings for the
122 console, useful for configuration with
123 <command>set-keymap</command>.</para>
124
125 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
126 </varlistentry>
127
128 <varlistentry>
129 <term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
130
131 <listitem><para>Set the system default keyboard mapping for
132 X11 and the virtual console. This takes a keyboard mapping
133 name (such as <literal>de</literal> or <literal>us</literal>),
134 and possibly a model, variant, and options, see
135 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
136 for details. Unless <option>--no-convert</option> is passed,
137 the selected setting is also applied as the system console
138 keyboard mapping, after converting it to the closest matching
139 console keyboard mapping.</para>
140
141 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
142 </varlistentry>
143
144 <varlistentry>
145 <term><command>list-x11-keymap-models</command></term>
146 <term><command>list-x11-keymap-layouts</command></term>
147 <term><command>list-x11-keymap-variants [LAYOUT]</command></term>
148 <term><command>list-x11-keymap-options</command></term>
149
150 <listitem><para>List available X11 keymap models, layouts,
151 variants and options, useful for configuration with
152 <command>set-keymap</command>. The command
153 <command>list-x11-keymap-variants</command> optionally takes a
154 layout parameter to limit the output to the variants suitable
155 for the specific layout.</para>
156
157 <xi:include href="version-info.xml" xpointer="v201"/></listitem>
158 </varlistentry>
159 </variablelist>
160
161 </refsect1>
162
163 <refsect1>
164 <title>Options</title>
165
166 <para>The following options are understood:</para>
167
168 <variablelist>
169 <varlistentry>
170 <term><option>-l</option></term>
171 <term><option>--full</option></term>
172
173 <listitem>
174 <para>Do not ellipsize the output.</para>
175
176 <xi:include href="version-info.xml" xpointer="v257"/>
177 </listitem>
178 </varlistentry>
179
180 <varlistentry>
181 <term><option>--no-convert</option></term>
182
183 <listitem><para>If <command>set-keymap</command> or
184 <command>set-x11-keymap</command> is invoked and this option
185 is passed, then the keymap will not be converted from the
186 console to X11, or X11 to console,
187 respectively.</para>
188
189 <xi:include href="version-info.xml" xpointer="v195"/></listitem>
190 </varlistentry>
191
192 <xi:include href="user-system-options.xml" xpointer="host" />
193 <xi:include href="user-system-options.xml" xpointer="machine" />
194
195 <xi:include href="standard-options.xml" xpointer="no-ask-password" />
196 <xi:include href="standard-options.xml" xpointer="help" />
197 <xi:include href="standard-options.xml" xpointer="version" />
198 <xi:include href="standard-options.xml" xpointer="no-pager" />
199 </variablelist>
200 </refsect1>
201
202 <refsect1>
203 <title>Exit status</title>
204
205 <para>On success, 0 is returned, a non-zero failure code
206 otherwise.</para>
207 </refsect1>
208
209 <xi:include href="common-variables.xml" />
210
211 <refsect1>
212 <title>See Also</title>
213 <para><simplelist type="inline">
214 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
215 <member><citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
216 <member><citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
217 <member><citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
218 <member><citerefentry project='mankier'><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
219 <member><citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry></member>
220 <member><ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
221 The XKB Configuration Guide
222 </ulink></member>
223 <member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
224 <member><citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
225 <member><citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
226 </simplelist></para>
227 </refsect1>
228
229 </refentry>