257 lines
15 KiB
Plaintext
257 lines
15 KiB
Plaintext
|
|
LOCALECTL(1) localectl LOCALECTL(1)
|
|||
|
|
|
|||
|
|
NNAAMMEE
|
|||
|
|
localectl - Control the system locale and keyboard layout settings
|
|||
|
|
|
|||
|
|
SSYYNNOOPPSSIISS
|
|||
|
|
llooccaalleeccttll [OPTIONS...] {COMMAND}
|
|||
|
|
|
|||
|
|
DDEESSCCRRIIPPTTIIOONN
|
|||
|
|
llooccaalleeccttll may be used to query and change the system locale and
|
|||
|
|
keyboard layout settings. It communicates with ssyysstteemmdd--llooccaalleedd(8) to
|
|||
|
|
modify files such as /etc/locale.conf and /etc/vconsole.conf.
|
|||
|
|
|
|||
|
|
The system locale controls the language settings of system services and
|
|||
|
|
of the UI before the user logs in, such as the display manager, as well
|
|||
|
|
as the default for users after login.
|
|||
|
|
|
|||
|
|
The keyboard settings control the keyboard layout used on the text
|
|||
|
|
console and of the graphical UI before the user logs in, such as the
|
|||
|
|
display manager, as well as the default for users after login.
|
|||
|
|
|
|||
|
|
Note that the changes performed using this tool might require the
|
|||
|
|
initramfs to be rebuilt to take effect during early system boot. The
|
|||
|
|
initramfs is not rebuilt automatically by localectl.
|
|||
|
|
|
|||
|
|
Note that ssyysstteemmdd--ffiirrssttbboooott(1) may be used to initialize the system
|
|||
|
|
locale for mounted (but not booted) system images.
|
|||
|
|
|
|||
|
|
CCOOMMMMAANNDDSS
|
|||
|
|
The following commands are understood:
|
|||
|
|
|
|||
|
|
ssttaattuuss
|
|||
|
|
Show current settings of the system locale and keyboard mapping. If
|
|||
|
|
no command is specified, this is the implied default.
|
|||
|
|
|
|||
|
|
sseett--llooccaallee LLOOCCAALLEE, sseett--llooccaallee VVAARRIIAABBLLEE==LLOOCCAALLEE......
|
|||
|
|
Set the system locale. This takes one locale such as "en_US.UTF-8",
|
|||
|
|
or takes one or more locale assignments such as "LANG=de_DE.utf8",
|
|||
|
|
"LC_MESSAGES=en_GB.utf8", and so on. If one locale without variable
|
|||
|
|
name is provided, then "LANG=" locale variable will be set. See
|
|||
|
|
llooccaallee(7) for details on the available settings and their meanings.
|
|||
|
|
Use lliisstt--llooccaalleess for a list of available locales (see below).
|
|||
|
|
|
|||
|
|
lliisstt--llooccaalleess
|
|||
|
|
List available locales useful for configuration with sseett--llooccaallee.
|
|||
|
|
|
|||
|
|
sseett--kkeeyymmaapp MMAAPP [[TTOOGGGGLLEEMMAAPP]]
|
|||
|
|
Set the system keyboard mapping for the console and X11. This takes
|
|||
|
|
a mapping name (such as "de" or "us"), and possibly a second one to
|
|||
|
|
define a toggle keyboard mapping. Unless ----nnoo--ccoonnvveerrtt is passed,
|
|||
|
|
the selected setting is also applied as the default system keyboard
|
|||
|
|
mapping of X11, after converting it to the closest matching X11
|
|||
|
|
keyboard mapping. Use lliisstt--kkeeyymmaappss for a list of available keyboard
|
|||
|
|
mappings (see below).
|
|||
|
|
|
|||
|
|
lliisstt--kkeeyymmaappss
|
|||
|
|
List available keyboard mappings for the console, useful for
|
|||
|
|
configuration with sseett--kkeeyymmaapp.
|
|||
|
|
|
|||
|
|
sseett--xx1111--kkeeyymmaapp LLAAYYOOUUTT [[MMOODDEELL [[VVAARRIIAANNTT [[OOPPTTIIOONNSS]]]]]]
|
|||
|
|
Set the system default keyboard mapping for X11 and the virtual
|
|||
|
|
console. This takes a keyboard mapping name (such as "de" or "us"),
|
|||
|
|
and possibly a model, variant, and options, see kkbbdd(4) for details.
|
|||
|
|
Unless ----nnoo--ccoonnvveerrtt is passed, the selected setting is also applied
|
|||
|
|
as the system console keyboard mapping, after converting it to the
|
|||
|
|
closest matching console keyboard mapping.
|
|||
|
|
|
|||
|
|
lliisstt--xx1111--kkeeyymmaapp--mmooddeellss, lliisstt--xx1111--kkeeyymmaapp--llaayyoouuttss,
|
|||
|
|
lliisstt--xx1111--kkeeyymmaapp--vvaarriiaannttss [[LLAAYYOOUUTT]], lliisstt--xx1111--kkeeyymmaapp--ooppttiioonnss
|
|||
|
|
List available X11 keymap models, layouts, variants and options,
|
|||
|
|
useful for configuration with sseett--kkeeyymmaapp. The command
|
|||
|
|
lliisstt--xx1111--kkeeyymmaapp--vvaarriiaannttss optionally takes a layout parameter to
|
|||
|
|
limit the output to the variants suitable for the specific layout.
|
|||
|
|
|
|||
|
|
OOPPTTIIOONNSS
|
|||
|
|
The following options are understood:
|
|||
|
|
|
|||
|
|
----nnoo--aasskk--ppaasssswwoorrdd
|
|||
|
|
Do not query the user for authentication for privileged operations.
|
|||
|
|
|
|||
|
|
----nnoo--ccoonnvveerrtt
|
|||
|
|
If sseett--kkeeyymmaapp or sseett--xx1111--kkeeyymmaapp is invoked and this option is
|
|||
|
|
passed, then the keymap will not be converted from the console to
|
|||
|
|
X11, or X11 to console, respectively.
|
|||
|
|
|
|||
|
|
--HH, ----hhoosstt==
|
|||
|
|
Execute the operation remotely. Specify a hostname, or a username
|
|||
|
|
and hostname separated by "@", to connect to. The hostname may
|
|||
|
|
optionally be suffixed by a port ssh is listening on, separated by
|
|||
|
|
":", and then a container name, separated by "/", which connects
|
|||
|
|
directly to a specific container on the specified host. This will
|
|||
|
|
use SSH to talk to the remote machine manager instance. Container
|
|||
|
|
names may be enumerated with mmaacchhiinneeccttll --HH _H_O_S_T. Put IPv6 addresses
|
|||
|
|
in brackets.
|
|||
|
|
|
|||
|
|
--MM, ----mmaacchhiinnee==
|
|||
|
|
Execute operation on a local container. Specify a container name to
|
|||
|
|
connect to, optionally prefixed by a user name to connect as and a
|
|||
|
|
separating "@" character. If the special string ".host" is used in
|
|||
|
|
place of the container name, a connection to the local system is
|
|||
|
|
made (which is useful to connect to a specific user's user bus:
|
|||
|
|
"--user --machine=lennart@.host"). If the "@" syntax is not used,
|
|||
|
|
the connection is made as root user. If the "@" syntax is used
|
|||
|
|
either the left hand side or the right hand side may be omitted
|
|||
|
|
(but not both) in which case the local user name and ".host" are
|
|||
|
|
implied.
|
|||
|
|
|
|||
|
|
--hh, ----hheellpp
|
|||
|
|
Print a short help text and exit.
|
|||
|
|
|
|||
|
|
----vveerrssiioonn
|
|||
|
|
Print a short version string and exit.
|
|||
|
|
|
|||
|
|
----nnoo--ppaaggeerr
|
|||
|
|
Do not pipe output into a pager.
|
|||
|
|
|
|||
|
|
EEXXIITT SSTTAATTUUSS
|
|||
|
|
On success, 0 is returned, a non-zero failure code otherwise.
|
|||
|
|
|
|||
|
|
EENNVVIIRROONNMMEENNTT
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_O_G___L_E_V_E_L
|
|||
|
|
The maximum log level of emitted messages (messages with a higher
|
|||
|
|
log level, i.e. less important ones, will be suppressed). Either
|
|||
|
|
one of (in order of decreasing importance) eemmeerrgg, aalleerrtt, ccrriitt, eerrrr,
|
|||
|
|
wwaarrnniinngg, nnoottiiccee, iinnffoo, ddeebbuugg, or an integer in the range 0...7. See
|
|||
|
|
ssyysslloogg(3) for more information.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_O_G___C_O_L_O_R
|
|||
|
|
A boolean. If true, messages written to the tty will be colored
|
|||
|
|
according to priority.
|
|||
|
|
|
|||
|
|
This setting is only useful when messages are written directly to
|
|||
|
|
the terminal, because jjoouurrnnaallccttll(1) and other tools that display
|
|||
|
|
logs will color messages based on the log level on their own.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_O_G___T_I_M_E
|
|||
|
|
A boolean. If true, console log messages will be prefixed with a
|
|||
|
|
timestamp.
|
|||
|
|
|
|||
|
|
This setting is only useful when messages are written directly to
|
|||
|
|
the terminal or a file, because jjoouurrnnaallccttll(1) and other tools that
|
|||
|
|
display logs will attach timestamps based on the entry metadata on
|
|||
|
|
their own.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_O_G___L_O_C_A_T_I_O_N
|
|||
|
|
A boolean. If true, messages will be prefixed with a filename and
|
|||
|
|
line number in the source code where the message originates.
|
|||
|
|
|
|||
|
|
Note that the log location is often attached as metadata to journal
|
|||
|
|
entries anyway. Including it directly in the message text can
|
|||
|
|
nevertheless be convenient when debugging programs.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_O_G___T_I_D
|
|||
|
|
A boolean. If true, messages will be prefixed with the current
|
|||
|
|
numerical thread ID (TID).
|
|||
|
|
|
|||
|
|
Note that the this information is attached as metadata to journal
|
|||
|
|
entries anyway. Including it directly in the message text can
|
|||
|
|
nevertheless be convenient when debugging programs.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_O_G___T_A_R_G_E_T
|
|||
|
|
The destination for log messages. One of ccoonnssoollee (log to the
|
|||
|
|
attached tty), ccoonnssoollee--pprreeffiixxeedd (log to the attached tty but with
|
|||
|
|
prefixes encoding the log level and "facility", see ssyysslloogg(3), kkmmssgg
|
|||
|
|
(log to the kernel circular log buffer), jjoouurrnnaall (log to the
|
|||
|
|
journal), jjoouurrnnaall--oorr--kkmmssgg (log to the journal if available, and to
|
|||
|
|
kmsg otherwise), aauuttoo (determine the appropriate log target
|
|||
|
|
automatically, the default), nnuullll (disable log output).
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___P_A_G_E_R
|
|||
|
|
Pager to use when ----nnoo--ppaaggeerr is not given; overrides _$_P_A_G_E_R. If
|
|||
|
|
neither _$_S_Y_S_T_E_M_D___P_A_G_E_R nor _$_P_A_G_E_R are set, a set of well-known
|
|||
|
|
pager implementations are tried in turn, including lleessss(1) and
|
|||
|
|
mmoorree(1), until one is found. If no pager implementation is
|
|||
|
|
discovered no pager is invoked. Setting this environment variable
|
|||
|
|
to an empty string or the value "cat" is equivalent to passing
|
|||
|
|
----nnoo--ppaaggeerr.
|
|||
|
|
|
|||
|
|
Note: if _$_S_Y_S_T_E_M_D___P_A_G_E_R_S_E_C_U_R_E is not set, _$_S_Y_S_T_E_M_D___P_A_G_E_R (as well
|
|||
|
|
as _$_P_A_G_E_R) will be silently ignored.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_E_S_S
|
|||
|
|
Override the options passed to lleessss (by default "FRSXMK").
|
|||
|
|
|
|||
|
|
Users might want to change two options in particular:
|
|||
|
|
|
|||
|
|
KK
|
|||
|
|
This option instructs the pager to exit immediately when Ctrl+C
|
|||
|
|
is pressed. To allow lleessss to handle Ctrl+C itself to switch
|
|||
|
|
back to the pager command prompt, unset this option.
|
|||
|
|
|
|||
|
|
If the value of _$_S_Y_S_T_E_M_D___L_E_S_S does not include "K", and the
|
|||
|
|
pager that is invoked is lleessss, Ctrl+C will be ignored by the
|
|||
|
|
executable, and needs to be handled by the pager.
|
|||
|
|
|
|||
|
|
XX
|
|||
|
|
This option instructs the pager to not send termcap
|
|||
|
|
initialization and deinitialization strings to the terminal. It
|
|||
|
|
is set by default to allow command output to remain visible in
|
|||
|
|
the terminal even after the pager exits. Nevertheless, this
|
|||
|
|
prevents some pager functionality from working, in particular
|
|||
|
|
paged output cannot be scrolled with the mouse.
|
|||
|
|
|
|||
|
|
See lleessss(1) for more discussion.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___L_E_S_S_C_H_A_R_S_E_T
|
|||
|
|
Override the charset passed to lleessss (by default "utf-8", if the
|
|||
|
|
invoking terminal is determined to be UTF-8 compatible).
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___P_A_G_E_R_S_E_C_U_R_E
|
|||
|
|
Takes a boolean argument. When true, the "secure" mode of the pager
|
|||
|
|
is enabled; if false, disabled. If _$_S_Y_S_T_E_M_D___P_A_G_E_R_S_E_C_U_R_E is not set
|
|||
|
|
at all, secure mode is enabled if the effective UID is not the same
|
|||
|
|
as the owner of the login session, see ggeetteeuuiidd(2) and
|
|||
|
|
ssdd__ppiidd__ggeett__oowwnneerr__uuiidd(3). In secure mode, LLEESSSSSSEECCUURREE==11 will be set
|
|||
|
|
when invoking the pager, and the pager shall disable commands that
|
|||
|
|
open or create new files or start new subprocesses. When
|
|||
|
|
_$_S_Y_S_T_E_M_D___P_A_G_E_R_S_E_C_U_R_E is not set at all, pagers which are not known
|
|||
|
|
to implement secure mode will not be used. (Currently only lleessss(1)
|
|||
|
|
implements secure mode.)
|
|||
|
|
|
|||
|
|
Note: when commands are invoked with elevated privileges, for
|
|||
|
|
example under ssuuddoo(8) or ppkkeexxeecc(1), care must be taken to ensure
|
|||
|
|
that unintended interactive features are not enabled. "Secure" mode
|
|||
|
|
for the pager may be enabled automatically as describe above.
|
|||
|
|
Setting _S_Y_S_T_E_M_D___P_A_G_E_R_S_E_C_U_R_E_=_0 or not removing it from the inherited
|
|||
|
|
environment allows the user to invoke arbitrary commands. Note that
|
|||
|
|
if the _$_S_Y_S_T_E_M_D___P_A_G_E_R or _$_P_A_G_E_R variables are to be honoured,
|
|||
|
|
_$_S_Y_S_T_E_M_D___P_A_G_E_R_S_E_C_U_R_E must be set too. It might be reasonable to
|
|||
|
|
completely disable the pager using ----nnoo--ppaaggeerr instead.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___C_O_L_O_R_S
|
|||
|
|
Takes a boolean argument. When true, ssyysstteemmdd and related utilities
|
|||
|
|
will use colors in their output, otherwise the output will be
|
|||
|
|
monochrome. Additionally, the variable can take one of the
|
|||
|
|
following special values: "16", "256" to restrict the use of colors
|
|||
|
|
to the base 16 or 256 ANSI colors, respectively. This can be
|
|||
|
|
specified to override the automatic decision based on _$_T_E_R_M and
|
|||
|
|
what the console is connected to.
|
|||
|
|
|
|||
|
|
_$_S_Y_S_T_E_M_D___U_R_L_I_F_Y
|
|||
|
|
The value must be a boolean. Controls whether clickable links
|
|||
|
|
should be generated in the output for terminal emulators supporting
|
|||
|
|
this. This can be specified to override the decision that ssyysstteemmdd
|
|||
|
|
makes based on _$_T_E_R_M and other conditions.
|
|||
|
|
|
|||
|
|
SSEEEE AALLSSOO
|
|||
|
|
ssyysstteemmdd(1), llooccaallee(7), llooccaallee..ccoonnff(5), vvccoonnssoollee..ccoonnff(5), llooaaddkkeeyyss(1),
|
|||
|
|
kkbbdd(4), TThhee XXKKBB CCoonnffiigguurraattiioonn GGuuiiddee[1], ssyysstteemmccttll(1), ssyysstteemmdd--
|
|||
|
|
llooccaalleedd..sseerrvviiccee(8), ssyysstteemmdd--ffiirrssttbboooott(1), mmkkiinniittrrdd(8)
|
|||
|
|
|
|||
|
|
NNOOTTEESS
|
|||
|
|
1. The XKB Configuration Guide
|
|||
|
|
http://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html
|
|||
|
|
|
|||
|
|
systemd 251 LOCALECTL(1)
|