1LOCALECTL(1)                       localectl                      LOCALECTL(1)
2
3
4

NAME

6       localectl - Control the system locale and keyboard layout settings
7

SYNOPSIS

9       localectl [OPTIONS...] {COMMAND}
10

DESCRIPTION

12       localectl may be used to query and change the system locale and
13       keyboard layout settings. It communicates with systemd-localed(8) to
14       modify files such as /etc/locale.conf and /etc/vconsole.conf.
15
16       The system locale controls the language settings of system services and
17       of the UI before the user logs in, such as the display manager, as well
18       as the default for users after login.
19
20       The keyboard settings control the keyboard layout used on the text
21       console and of the graphical UI before the user logs in, such as the
22       display manager, as well as the default for users after login.
23
24       Note that the changes performed using this tool might require the
25       initramfs to be rebuilt to take effect during early system boot. The
26       initramfs is not rebuilt automatically by localectl.
27
28       Note that systemd-firstboot(1) may be used to initialize the system
29       locale for mounted (but not booted) system images.
30

COMMANDS

32       The following commands are understood:
33
34       status
35           Show current settings of the system locale and keyboard mapping. If
36           no command is specified, this is the implied default.
37
38       set-locale LOCALE, set-locale VARIABLE=LOCALE...
39           Set the system locale. This takes one locale such as "en_US.UTF-8",
40           or takes one or more locale assignments such as "LANG=de_DE.utf8",
41           "LC_MESSAGES=en_GB.utf8", and so on. If one locale without variable
42           name is provided, then "LANG=" locale variable will be set. See
43           locale(7) for details on the available settings and their meanings.
44           Use list-locales for a list of available locales (see below).
45
46       list-locales
47           List available locales useful for configuration with set-locale.
48
49       set-keymap MAP [TOGGLEMAP]
50           Set the system keyboard mapping for the console and X11. This takes
51           a mapping name (such as "de" or "us"), and possibly a second one to
52           define a toggle keyboard mapping. Unless --no-convert is passed,
53           the selected setting is also applied as the default system keyboard
54           mapping of X11, after converting it to the closest matching X11
55           keyboard mapping. Use list-keymaps for a list of available keyboard
56           mappings (see below).
57
58       list-keymaps
59           List available keyboard mappings for the console, useful for
60           configuration with set-keymap.
61
62       set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]
63           Set the system default keyboard mapping for X11 and the virtual
64           console. This takes a keyboard mapping name (such as "de" or "us"),
65           and possibly a model, variant, and options, see kbd(4) for details.
66           Unless --no-convert is passed, the selected setting is also applied
67           as the system console keyboard mapping, after converting it to the
68           closest matching console keyboard mapping.
69
70       list-x11-keymap-models, list-x11-keymap-layouts,
71       list-x11-keymap-variants [LAYOUT], list-x11-keymap-options
72           List available X11 keymap models, layouts, variants and options,
73           useful for configuration with set-keymap. The command
74           list-x11-keymap-variants optionally takes a layout parameter to
75           limit the output to the variants suitable for the specific layout.
76

OPTIONS

78       The following options are understood:
79
80       --no-ask-password
81           Do not query the user for authentication for privileged operations.
82
83       --no-convert
84           If set-keymap or set-x11-keymap is invoked and this option is
85           passed, then the keymap will not be converted from the console to
86           X11, or X11 to console, respectively.
87
88       -H, --host=
89           Execute the operation remotely. Specify a hostname, or a username
90           and hostname separated by "@", to connect to. The hostname may
91           optionally be suffixed by a port ssh is listening on, separated by
92           ":", and then a container name, separated by "/", which connects
93           directly to a specific container on the specified host. This will
94           use SSH to talk to the remote machine manager instance. Container
95           names may be enumerated with machinectl -H HOST. Put IPv6 addresses
96           in brackets.
97
98       -M, --machine=
99           Execute operation on a local container. Specify a container name to
100           connect to, optionally prefixed by a user name to connect as and a
101           separating "@" character. If the special string ".host" is used in
102           place of the container name, a connection to the local system is
103           made (which is useful to connect to a specific user's user bus:
104           "--user --machine=lennart@.host"). If the "@" syntax is not used,
105           the connection is made as root user. If the "@" syntax is used
106           either the left hand side or the right hand side may be omitted
107           (but not both) in which case the local user name and ".host" are
108           implied.
109
110       -h, --help
111           Print a short help text and exit.
112
113       --version
114           Print a short version string and exit.
115
116       --no-pager
117           Do not pipe output into a pager.
118

EXIT STATUS

120       On success, 0 is returned, a non-zero failure code otherwise.
121

ENVIRONMENT

123       $SYSTEMD_LOG_LEVEL
124           The maximum log level of emitted messages (messages with a higher
125           log level, i.e. less important ones, will be suppressed). Either
126           one of (in order of decreasing importance) emerg, alert, crit, err,
127           warning, notice, info, debug, or an integer in the range 0...7. See
128           syslog(3) for more information.
129
130       $SYSTEMD_LOG_COLOR
131           A boolean. If true, messages written to the tty will be colored
132           according to priority.
133
134           This setting is only useful when messages are written directly to
135           the terminal, because journalctl(1) and other tools that display
136           logs will color messages based on the log level on their own.
137
138       $SYSTEMD_LOG_TIME
139           A boolean. If true, console log messages will be prefixed with a
140           timestamp.
141
142           This setting is only useful when messages are written directly to
143           the terminal or a file, because journalctl(1) and other tools that
144           display logs will attach timestamps based on the entry metadata on
145           their own.
146
147       $SYSTEMD_LOG_LOCATION
148           A boolean. If true, messages will be prefixed with a filename and
149           line number in the source code where the message originates.
150
151           Note that the log location is often attached as metadata to journal
152           entries anyway. Including it directly in the message text can
153           nevertheless be convenient when debugging programs.
154
155       $SYSTEMD_LOG_TID
156           A boolean. If true, messages will be prefixed with the current
157           numerical thread ID (TID).
158
159           Note that the this information is attached as metadata to journal
160           entries anyway. Including it directly in the message text can
161           nevertheless be convenient when debugging programs.
162
163       $SYSTEMD_LOG_TARGET
164           The destination for log messages. One of console (log to the
165           attached tty), console-prefixed (log to the attached tty but with
166           prefixes encoding the log level and "facility", see syslog(3), kmsg
167           (log to the kernel circular log buffer), journal (log to the
168           journal), journal-or-kmsg (log to the journal if available, and to
169           kmsg otherwise), auto (determine the appropriate log target
170           automatically, the default), null (disable log output).
171
172       $SYSTEMD_PAGER
173           Pager to use when --no-pager is not given; overrides $PAGER. If
174           neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known
175           pager implementations are tried in turn, including less(1) and
176           more(1), until one is found. If no pager implementation is
177           discovered no pager is invoked. Setting this environment variable
178           to an empty string or the value "cat" is equivalent to passing
179           --no-pager.
180
181           Note: if $SYSTEMD_PAGERSECURE is not set, $SYSTEMD_PAGER (as well
182           as $PAGER) will be silently ignored.
183
184       $SYSTEMD_LESS
185           Override the options passed to less (by default "FRSXMK").
186
187           Users might want to change two options in particular:
188
189           K
190               This option instructs the pager to exit immediately when Ctrl+C
191               is pressed. To allow less to handle Ctrl+C itself to switch
192               back to the pager command prompt, unset this option.
193
194               If the value of $SYSTEMD_LESS does not include "K", and the
195               pager that is invoked is less, Ctrl+C will be ignored by the
196               executable, and needs to be handled by the pager.
197
198           X
199               This option instructs the pager to not send termcap
200               initialization and deinitialization strings to the terminal. It
201               is set by default to allow command output to remain visible in
202               the terminal even after the pager exits. Nevertheless, this
203               prevents some pager functionality from working, in particular
204               paged output cannot be scrolled with the mouse.
205
206           See less(1) for more discussion.
207
208       $SYSTEMD_LESSCHARSET
209           Override the charset passed to less (by default "utf-8", if the
210           invoking terminal is determined to be UTF-8 compatible).
211
212       $SYSTEMD_PAGERSECURE
213           Takes a boolean argument. When true, the "secure" mode of the pager
214           is enabled; if false, disabled. If $SYSTEMD_PAGERSECURE is not set
215           at all, secure mode is enabled if the effective UID is not the same
216           as the owner of the login session, see geteuid(2) and
217           sd_pid_get_owner_uid(3). In secure mode, LESSSECURE=1 will be set
218           when invoking the pager, and the pager shall disable commands that
219           open or create new files or start new subprocesses. When
220           $SYSTEMD_PAGERSECURE is not set at all, pagers which are not known
221           to implement secure mode will not be used. (Currently only less(1)
222           implements secure mode.)
223
224           Note: when commands are invoked with elevated privileges, for
225           example under sudo(8) or pkexec(1), care must be taken to ensure
226           that unintended interactive features are not enabled. "Secure" mode
227           for the pager may be enabled automatically as describe above.
228           Setting SYSTEMD_PAGERSECURE=0 or not removing it from the inherited
229           environment allows the user to invoke arbitrary commands. Note that
230           if the $SYSTEMD_PAGER or $PAGER variables are to be honoured,
231           $SYSTEMD_PAGERSECURE must be set too. It might be reasonable to
232           completely disable the pager using --no-pager instead.
233
234       $SYSTEMD_COLORS
235           Takes a boolean argument. When true, systemd and related utilities
236           will use colors in their output, otherwise the output will be
237           monochrome. Additionally, the variable can take one of the
238           following special values: "16", "256" to restrict the use of colors
239           to the base 16 or 256 ANSI colors, respectively. This can be
240           specified to override the automatic decision based on $TERM and
241           what the console is connected to.
242
243       $SYSTEMD_URLIFY
244           The value must be a boolean. Controls whether clickable links
245           should be generated in the output for terminal emulators supporting
246           this. This can be specified to override the decision that systemd
247           makes based on $TERM and other conditions.
248

SEE ALSO

250       systemd(1), locale(7), locale.conf(5), vconsole.conf(5), loadkeys(1),
251       kbd(4), The XKB Configuration Guide[1], systemctl(1), systemd-
252       localed.service(8), systemd-firstboot(1), mkinitrd(8)
253

NOTES

255        1. The XKB Configuration Guide
256           http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html
257
258
259
260systemd 251                                                       LOCALECTL(1)
Impressum