]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/localectl.xml
travis: use UBSan checks from OSS-Fuzz
[thirdparty/systemd.git] / man / localectl.xml
CommitLineData
7cd28a8a 1<?xml version='1.0'?> <!--*-nxml-*-->
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0307f791 4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
7cd28a8a 5
21ac6ff1 6<refentry id="localectl" conditional='ENABLE_LOCALED'
798d3a52
ZJS
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>localectl</title>
11 <productname>systemd</productname>
798d3a52
ZJS
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
dfc6109f
ZJS
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>
798d3a52
ZJS
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
dfc6109f
ZJS
51 <para>Note that the changes performed using this tool might require
52 the initramfs to be rebuilt to take effect during early system boot.
53 The initramfs is not rebuilt automatically by <filename>localectl</filename>.
54 </para>
55
56 <para>Note that
798d3a52 57 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
dfc6109f 58 may be used to initialize the system locale for mounted (but not booted)
798d3a52
ZJS
59 system images.</para>
60 </refsect1>
61
62 <refsect1>
63 <title>Options</title>
64
65 <para>The following options are understood:</para>
66
67 <variablelist>
68 <varlistentry>
69 <term><option>--no-ask-password</option></term>
70
71 <listitem><para>Do not query the user for authentication for
72 privileged operations.</para></listitem>
73 </varlistentry>
74
75 <varlistentry>
76 <term><option>--no-convert</option></term>
77
78 <listitem><para>If <command>set-keymap</command> or
79 <command>set-x11-keymap</command> is invoked and this option
80 is passed, then the keymap will not be converted from the
81 console to X11, or X11 to console,
82 respectively.</para></listitem>
83 </varlistentry>
84
85 <xi:include href="user-system-options.xml" xpointer="host" />
af8cbf47 86 <xi:include href="user-system-options.xml" xpointer="machine" />
798d3a52
ZJS
87
88 <xi:include href="standard-options.xml" xpointer="help" />
89 <xi:include href="standard-options.xml" xpointer="version" />
90 <xi:include href="standard-options.xml" xpointer="no-pager" />
91 </variablelist>
d4e0773b
YW
92 </refsect1>
93
94 <refsect1>
95 <title>Commands</title>
798d3a52
ZJS
96
97 <para>The following commands are understood:</para>
98
99 <variablelist>
100 <varlistentry>
101 <term><command>status</command></term>
102
d4e0773b
YW
103 <listitem><para>Show current settings of the system locale and keyboard mapping.
104 If no command is specified, this is the implied default.</para></listitem>
798d3a52
ZJS
105 </varlistentry>
106
107 <varlistentry>
4156e767
YW
108 <term><command>set-locale LOCALE</command></term>
109 <term><command>set-locale VARIABLE=LOCALE…</command></term>
798d3a52 110
4156e767
YW
111 <listitem><para>Set the system locale. This takes one locale such as <literal>en_US.UTF-8</literal>, or takes one or more
112 locale assignments such as <literal>LANG=de_DE.utf8</literal>, <literal>LC_MESSAGES=en_GB.utf8</literal>, and so on. If
113 one locale without variable name is provided, then <literal>LANG=</literal> locale variable will be set. See
3ba3a79d 114 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
798d3a52
ZJS
115 for details on the available settings and their meanings. Use
116 <command>list-locales</command> for a list of available
117 locales (see below). </para></listitem>
118 </varlistentry>
119
120 <varlistentry>
121 <term><command>list-locales</command></term>
122
123 <listitem><para>List available locales useful for
124 configuration with
125 <command>set-locale</command>.</para></listitem>
126 </varlistentry>
127
128 <varlistentry>
129 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
130
131 <listitem><para>Set the system keyboard mapping for the
132 console and X11. This takes a mapping name (such as "de" or
133 "us"), and possibly a second one to define a toggle keyboard
134 mapping. Unless <option>--no-convert</option> is passed, the
135 selected setting is also applied as the default system
136 keyboard mapping of X11, after converting it to the closest
137 matching X11 keyboard mapping. Use
138 <command>list-keymaps</command> for a list of available
139 keyboard mappings (see below).</para></listitem>
140 </varlistentry>
141
142 <varlistentry>
143 <term><command>list-keymaps</command></term>
144
145 <listitem><para>List available keyboard mappings for the
146 console, useful for configuration with
147 <command>set-keymap</command>.</para></listitem>
148 </varlistentry>
149
150 <varlistentry>
151 <term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
152
153 <listitem><para>Set the system default keyboard mapping for
154 X11 and the virtual console. This takes a keyboard mapping
155 name (such as <literal>de</literal> or <literal>us</literal>),
156 and possibly a model, variant, and options, see
157 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
158 for details. Unless <option>--no-convert</option> is passed,
159 the selected setting is also applied as the system console
160 keyboard mapping, after converting it to the closest matching
161 console keyboard mapping.</para></listitem>
162 </varlistentry>
163
164 <varlistentry>
165 <term><command>list-x11-keymap-models</command></term>
166 <term><command>list-x11-keymap-layouts</command></term>
167 <term><command>list-x11-keymap-variants [LAYOUT]</command></term>
168 <term><command>list-x11-keymap-options</command></term>
169
170 <listitem><para>List available X11 keymap models, layouts,
171 variants and options, useful for configuration with
172 <command>set-keymap</command>. The command
173 <command>list-x11-keymap-variants</command> optionally takes a
174 layout parameter to limit the output to the variants suitable
175 for the specific layout.</para></listitem>
176 </varlistentry>
177 </variablelist>
178
179 </refsect1>
180
181 <refsect1>
182 <title>Exit status</title>
183
184 <para>On success, 0 is returned, a non-zero failure code
185 otherwise.</para>
186 </refsect1>
187
188 <xi:include href="less-variables.xml" />
189
190 <refsect1>
191 <title>See Also</title>
192 <para>
193 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3ba3a79d
ZJS
194 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
195 <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
798d3a52 196 <citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3ba3a79d 197 <citerefentry project='mankier'><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
798d3a52
ZJS
198 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
199 <ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
200 The XKB Configuration Guide
201 </ulink>,
202 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
203 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
dfc6109f 204 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
0a07667d 205 <citerefentry project='die-net'><refentrytitle>mkinitrd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
206 </para>
207 </refsect1>
7cd28a8a
LP
208
209</refentry>