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