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