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