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