]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/localectl.xml
Add SPDX license identifiers to man pages
[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
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
21ac6ff1 26<refentry id="localectl" conditional='ENABLE_LOCALED'
798d3a52
ZJS
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
dfc6109f
ZJS
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>
798d3a52
ZJS
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
dfc6109f
ZJS
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
798d3a52 86 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
dfc6109f 87 may be used to initialize the system locale for mounted (but not booted)
798d3a52
ZJS
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
116 <xi:include href="standard-options.xml" xpointer="help" />
117 <xi:include href="standard-options.xml" xpointer="version" />
118 <xi:include href="standard-options.xml" xpointer="no-pager" />
119 </variablelist>
120
121 <para>The following commands are understood:</para>
122
123 <variablelist>
124 <varlistentry>
125 <term><command>status</command></term>
126
127 <listitem><para>Show current settings of the system locale and
128 keyboard mapping.</para></listitem>
129 </varlistentry>
130
131 <varlistentry>
1eecafb8 132 <term><command>set-locale LOCALE…</command></term>
798d3a52
ZJS
133
134 <listitem><para>Set the system locale. This takes one or more
135 assignments such as "LANG=de_DE.utf8",
136 "LC_MESSAGES=en_GB.utf8", and so on. See
3ba3a79d 137 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>
798d3a52
ZJS
138 for details on the available settings and their meanings. Use
139 <command>list-locales</command> for a list of available
140 locales (see below). </para></listitem>
141 </varlistentry>
142
143 <varlistentry>
144 <term><command>list-locales</command></term>
145
146 <listitem><para>List available locales useful for
147 configuration with
148 <command>set-locale</command>.</para></listitem>
149 </varlistentry>
150
151 <varlistentry>
152 <term><command>set-keymap MAP [TOGGLEMAP]</command></term>
153
154 <listitem><para>Set the system keyboard mapping for the
155 console and X11. This takes a mapping name (such as "de" or
156 "us"), and possibly a second one to define a toggle keyboard
157 mapping. Unless <option>--no-convert</option> is passed, the
158 selected setting is also applied as the default system
159 keyboard mapping of X11, after converting it to the closest
160 matching X11 keyboard mapping. Use
161 <command>list-keymaps</command> for a list of available
162 keyboard mappings (see below).</para></listitem>
163 </varlistentry>
164
165 <varlistentry>
166 <term><command>list-keymaps</command></term>
167
168 <listitem><para>List available keyboard mappings for the
169 console, useful for configuration with
170 <command>set-keymap</command>.</para></listitem>
171 </varlistentry>
172
173 <varlistentry>
174 <term><command>set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]</command></term>
175
176 <listitem><para>Set the system default keyboard mapping for
177 X11 and the virtual console. This takes a keyboard mapping
178 name (such as <literal>de</literal> or <literal>us</literal>),
179 and possibly a model, variant, and options, see
180 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>
181 for details. Unless <option>--no-convert</option> is passed,
182 the selected setting is also applied as the system console
183 keyboard mapping, after converting it to the closest matching
184 console keyboard mapping.</para></listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><command>list-x11-keymap-models</command></term>
189 <term><command>list-x11-keymap-layouts</command></term>
190 <term><command>list-x11-keymap-variants [LAYOUT]</command></term>
191 <term><command>list-x11-keymap-options</command></term>
192
193 <listitem><para>List available X11 keymap models, layouts,
194 variants and options, useful for configuration with
195 <command>set-keymap</command>. The command
196 <command>list-x11-keymap-variants</command> optionally takes a
197 layout parameter to limit the output to the variants suitable
198 for the specific layout.</para></listitem>
199 </varlistentry>
200 </variablelist>
201
202 </refsect1>
203
204 <refsect1>
205 <title>Exit status</title>
206
207 <para>On success, 0 is returned, a non-zero failure code
208 otherwise.</para>
209 </refsect1>
210
211 <xi:include href="less-variables.xml" />
212
213 <refsect1>
214 <title>See Also</title>
215 <para>
216 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3ba3a79d
ZJS
217 <citerefentry project='man-pages'><refentrytitle>locale</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
218 <citerefentry project='man-pages'><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
798d3a52 219 <citerefentry><refentrytitle>vconsole.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
3ba3a79d 220 <citerefentry project='mankier'><refentrytitle>loadkeys</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
798d3a52
ZJS
221 <citerefentry><refentrytitle>kbd</refentrytitle><manvolnum>4</manvolnum></citerefentry>,
222 <ulink url="http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html">
223 The XKB Configuration Guide
224 </ulink>,
225 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
226 <citerefentry><refentrytitle>systemd-localed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
dfc6109f 227 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
0a07667d 228 <citerefentry project='die-net'><refentrytitle>mkinitrd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
798d3a52
ZJS
229 </para>
230 </refsect1>
7cd28a8a
LP
231
232</refentry>