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