{
    "content": [
        {
            "type": "text",
            "text": "# localectl (man)\n\n## NAME\n\nlocalectl - Control the system locale and keyboard layout settings\n\n## SYNOPSIS\n\nlocalectl [OPTIONS...] {COMMAND}\n\n## DESCRIPTION\n\nlocalectl may be used to query and change the system locale and keyboard layout settings. It\ncommunicates with systemd-localed(8) to modify files such as /etc/locale.conf and\n/etc/vconsole.conf.\n\n## TLDR\n\n> Control the system locale and keyboard layout settings.\n\n- Show the current settings of the system locale and keyboard mapping:\n  `localectl`\n- List available locales:\n  `localectl list-locales`\n- Set a system locale variable:\n  `localectl set-locale {{LANG}}={{en_US.UTF-8}}`\n- List available keymaps:\n  `localectl list-keymaps`\n- Set the system keyboard mapping for the console and X11:\n  `localectl set-keymap {{us}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **COMMANDS** (6 subsections)\n- **OPTIONS** (7 subsections)\n- **EXIT STATUS**\n- **ENVIRONMENT**\n- **SEE ALSO**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "localectl",
        "section": "",
        "mode": "man",
        "summary": "localectl - Control the system locale and keyboard layout settings",
        "synopsis": "localectl [OPTIONS...] {COMMAND}",
        "tldr_summary": "Control the system locale and keyboard layout settings.",
        "tldr_examples": [
            {
                "description": "Show the current settings of the system locale and keyboard mapping",
                "command": "localectl"
            },
            {
                "description": "List available locales",
                "command": "localectl list-locales"
            },
            {
                "description": "Set a system locale variable",
                "command": "localectl set-locale {{LANG}}={{en_US.UTF-8}}"
            },
            {
                "description": "List available keymaps",
                "command": "localectl list-keymaps"
            },
            {
                "description": "Set the system keyboard mapping for the console and X11",
                "command": "localectl set-keymap {{us}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--no-ask-password",
                "arg": null,
                "description": "Do not query the user for authentication for privileged operations."
            },
            {
                "flag": "",
                "long": "--no-convert",
                "arg": null,
                "description": "If set-keymap or set-x11-keymap is invoked and this option is passed, then the keymap will not be converted from the console to X11, or X11 to console, respectively."
            },
            {
                "flag": "-H",
                "long": null,
                "arg": null,
                "description": "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 machinectl -H HOST. Put IPv6 addresses in brackets."
            },
            {
                "flag": "-M",
                "long": null,
                "arg": null,
                "description": "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."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Print a short help text and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print a short version string and exit."
            },
            {
                "flag": "",
                "long": "--no-pager",
                "arg": null,
                "description": "Do not pipe output into a pager."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "locale",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/locale/7/json"
            },
            {
                "name": "locale.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/locale.conf/5/json"
            },
            {
                "name": "vconsole.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/vconsole.conf/5/json"
            },
            {
                "name": "loadkeys",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/loadkeys/1/json"
            },
            {
                "name": "kbd",
                "section": "4",
                "url": "https://www.chedong.com/phpMan.php/man/kbd/4/json"
            },
            {
                "name": "systemctl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemctl/1/json"
            },
            {
                "name": "systemd-localed.service",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-localed.service/8/json"
            },
            {
                "name": "systemd-firstboot",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-firstboot/1/json"
            },
            {
                "name": "mkinitrd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/mkinitrd/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "COMMANDS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "status",
                        "lines": 10
                    },
                    {
                        "name": "list-locales",
                        "lines": 2
                    },
                    {
                        "name": "set-keymap MAP [TOGGLEMAP]",
                        "lines": 6
                    },
                    {
                        "name": "list-keymaps",
                        "lines": 3
                    },
                    {
                        "name": "set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]",
                        "lines": 7
                    },
                    {
                        "name": "list-x11-keymap-options",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "--no-ask-password",
                        "lines": 2,
                        "long": "--no-ask-password"
                    },
                    {
                        "name": "--no-convert",
                        "lines": 3,
                        "long": "--no-convert"
                    },
                    {
                        "name": "-H --host=",
                        "lines": 7,
                        "flag": "-H"
                    },
                    {
                        "name": "-M --machine=",
                        "lines": 8,
                        "flag": "-M"
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    },
                    {
                        "name": "--no-pager",
                        "lines": 2,
                        "long": "--no-pager"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 105,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "localectl - Control the system locale and keyboard layout settings\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "localectl [OPTIONS...] {COMMAND}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "localectl may be used to query and change the system locale and keyboard layout settings. It\ncommunicates with systemd-localed(8) to modify files such as /etc/locale.conf and\n/etc/vconsole.conf.\n\nThe system locale controls the language settings of system services and of the UI before the\nuser logs in, such as the display manager, as well as the default for users after login.\n\nThe keyboard settings control the keyboard layout used on the text console and of the\ngraphical UI before the user logs in, such as the display manager, as well as the default for\nusers after login.\n\nNote that the changes performed using this tool might require the initramfs to be rebuilt to\ntake effect during early system boot. The initramfs is not rebuilt automatically by\nlocalectl.\n\nNote that systemd-firstboot(1) may be used to initialize the system locale for mounted (but\nnot booted) system images.\n",
                "subsections": []
            },
            "COMMANDS": {
                "content": "The following commands are understood:\n",
                "subsections": [
                    {
                        "name": "status",
                        "content": "Show current settings of the system locale and keyboard mapping. If no command is\nspecified, this is the implied default.\n\nset-locale LOCALE, set-locale VARIABLE=LOCALE...\nSet the system locale. This takes one locale such as \"enUS.UTF-8\", or takes one or more\nlocale assignments such as \"LANG=deDE.utf8\", \"LCMESSAGES=enGB.utf8\", and so on. If one\nlocale without variable name is provided, then \"LANG=\" locale variable will be set. See\nlocale(7) for details on the available settings and their meanings. Use list-locales for\na list of available locales (see below).\n"
                    },
                    {
                        "name": "list-locales",
                        "content": "List available locales useful for configuration with set-locale.\n"
                    },
                    {
                        "name": "set-keymap MAP [TOGGLEMAP]",
                        "content": "Set the system keyboard mapping for the console and X11. This takes a mapping name (such\nas \"de\" or \"us\"), and possibly a second one to define a toggle keyboard mapping. Unless\n--no-convert is passed, the selected setting is also applied as the default system\nkeyboard mapping of X11, after converting it to the closest matching X11 keyboard\nmapping. Use list-keymaps for a list of available keyboard mappings (see below).\n"
                    },
                    {
                        "name": "list-keymaps",
                        "content": "List available keyboard mappings for the console, useful for configuration with\nset-keymap.\n"
                    },
                    {
                        "name": "set-x11-keymap LAYOUT [MODEL [VARIANT [OPTIONS]]]",
                        "content": "Set the system default keyboard mapping for X11 and the virtual console. This takes a\nkeyboard mapping name (such as \"de\" or \"us\"), and possibly a model, variant, and options,\nsee kbd(4) for details. Unless --no-convert is passed, the selected setting is also\napplied as the system console keyboard mapping, after converting it to the closest\nmatching console keyboard mapping.\n\nlist-x11-keymap-models, list-x11-keymap-layouts, list-x11-keymap-variants [LAYOUT],"
                    },
                    {
                        "name": "list-x11-keymap-options",
                        "content": "List available X11 keymap models, layouts, variants and options, useful for configuration\nwith set-keymap. The command list-x11-keymap-variants optionally takes a layout parameter\nto limit the output to the variants suitable for the specific layout.\n"
                    }
                ]
            },
            "OPTIONS": {
                "content": "The following options are understood:\n",
                "subsections": [
                    {
                        "name": "--no-ask-password",
                        "content": "Do not query the user for authentication for privileged operations.\n",
                        "long": "--no-ask-password"
                    },
                    {
                        "name": "--no-convert",
                        "content": "If set-keymap or set-x11-keymap is invoked and this option is passed, then the keymap\nwill not be converted from the console to X11, or X11 to console, respectively.\n",
                        "long": "--no-convert"
                    },
                    {
                        "name": "-H --host=",
                        "content": "Execute the operation remotely. Specify a hostname, or a username and hostname separated\nby \"@\", to connect to. The hostname may optionally be suffixed by a port ssh is listening\non, separated by \":\", and then a container name, separated by \"/\", which connects\ndirectly to a specific container on the specified host. This will use SSH to talk to the\nremote machine manager instance. Container names may be enumerated with machinectl -H\nHOST. Put IPv6 addresses in brackets.\n",
                        "flag": "-H"
                    },
                    {
                        "name": "-M --machine=",
                        "content": "Execute operation on a local container. Specify a container name to connect to,\noptionally prefixed by a user name to connect as and a separating \"@\" character. If the\nspecial string \".host\" is used in place of the container name, a connection to the local\nsystem is made (which is useful to connect to a specific user's user bus: \"--user\n--machine=lennart@.host\"). If the \"@\" syntax is not used, the connection is made as root\nuser. If the \"@\" syntax is used either the left hand side or the right hand side may be\nomitted (but not both) in which case the local user name and \".host\" are implied.\n",
                        "flag": "-M"
                    },
                    {
                        "name": "-h --help",
                        "content": "Print a short help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "content": "Print a short version string and exit.\n",
                        "long": "--version"
                    },
                    {
                        "name": "--no-pager",
                        "content": "Do not pipe output into a pager.\n",
                        "long": "--no-pager"
                    }
                ]
            },
            "EXIT STATUS": {
                "content": "On success, 0 is returned, a non-zero failure code otherwise.\n",
                "subsections": []
            },
            "ENVIRONMENT": {
                "content": "$SYSTEMDLOGLEVEL\nThe maximum log level of emitted messages (messages with a higher log level, i.e. less\nimportant ones, will be suppressed). Either one of (in order of decreasing importance)\nemerg, alert, crit, err, warning, notice, info, debug, or an integer in the range 0...7.\nSee syslog(3) for more information.\n\n$SYSTEMDLOGCOLOR\nA boolean. If true, messages written to the tty will be colored according to priority.\n\nThis setting is only useful when messages are written directly to the terminal, because\njournalctl(1) and other tools that display logs will color messages based on the log\nlevel on their own.\n\n$SYSTEMDLOGTIME\nA boolean. If true, console log messages will be prefixed with a timestamp.\n\nThis setting is only useful when messages are written directly to the terminal or a file,\nbecause journalctl(1) and other tools that display logs will attach timestamps based on\nthe entry metadata on their own.\n\n$SYSTEMDLOGLOCATION\nA boolean. If true, messages will be prefixed with a filename and line number in the\nsource code where the message originates.\n\nNote that the log location is often attached as metadata to journal entries anyway.\nIncluding it directly in the message text can nevertheless be convenient when debugging\nprograms.\n\n$SYSTEMDLOGTID\nA boolean. If true, messages will be prefixed with the current numerical thread ID (TID).\n\nNote that the this information is attached as metadata to journal entries anyway.\nIncluding it directly in the message text can nevertheless be convenient when debugging\nprograms.\n\n$SYSTEMDLOGTARGET\nThe destination for log messages. One of console (log to the attached tty),\nconsole-prefixed (log to the attached tty but with prefixes encoding the log level and\n\"facility\", see syslog(3), kmsg (log to the kernel circular log buffer), journal (log to\nthe journal), journal-or-kmsg (log to the journal if available, and to kmsg otherwise),\nauto (determine the appropriate log target automatically, the default), null (disable log\noutput).\n\n$SYSTEMDPAGER\nPager to use when --no-pager is not given; overrides $PAGER. If neither $SYSTEMDPAGER\nnor $PAGER are set, a set of well-known pager implementations are tried in turn,\nincluding less(1) and more(1), until one is found. If no pager implementation is\ndiscovered no pager is invoked. Setting this environment variable to an empty string or\nthe value \"cat\" is equivalent to passing --no-pager.\n\n$SYSTEMDLESS\nOverride the options passed to less (by default \"FRSXMK\").\n\nUsers might want to change two options in particular:\n\nK\nThis option instructs the pager to exit immediately when Ctrl+C is pressed. To allow\nless to handle Ctrl+C itself to switch back to the pager command prompt, unset this\noption.\n\nIf the value of $SYSTEMDLESS does not include \"K\", and the pager that is invoked is\nless, Ctrl+C will be ignored by the executable, and needs to be handled by the pager.\n\nX\nThis option instructs the pager to not send termcap initialization and\ndeinitialization strings to the terminal. It is set by default to allow command\noutput to remain visible in the terminal even after the pager exits. Nevertheless,\nthis prevents some pager functionality from working, in particular paged output\ncannot be scrolled with the mouse.\n\nSee less(1) for more discussion.\n\n$SYSTEMDLESSCHARSET\nOverride the charset passed to less (by default \"utf-8\", if the invoking terminal is\ndetermined to be UTF-8 compatible).\n\n$SYSTEMDPAGERSECURE\nTakes a boolean argument. When true, the \"secure\" mode of the pager is enabled; if false,\ndisabled. If $SYSTEMDPAGERSECURE is not set at all, secure mode is enabled if the\neffective UID is not the same as the owner of the login session, see geteuid(2) and\nsdpidgetowneruid(3). In secure mode, LESSSECURE=1 will be set when invoking the\npager, and the pager shall disable commands that open or create new files or start new\nsubprocesses. When $SYSTEMDPAGERSECURE is not set at all, pagers which are not known to\nimplement secure mode will not be used. (Currently only less(1) implements secure mode.)\n\nNote: when commands are invoked with elevated privileges, for example under sudo(8) or\npkexec(1), care must be taken to ensure that unintended interactive features are not\nenabled. \"Secure\" mode for the pager may be enabled automatically as describe above.\nSetting SYSTEMDPAGERSECURE=0 or not removing it from the inherited environment allows\nthe user to invoke arbitrary commands. Note that if the $SYSTEMDPAGER or $PAGER\nvariables are to be honoured, $SYSTEMDPAGERSECURE must be set too. It might be\nreasonable to completely disable the pager using --no-pager instead.\n\n$SYSTEMDCOLORS\nTakes a boolean argument. When true, systemd and related utilities will use colors in\ntheir output, otherwise the output will be monochrome. Additionally, the variable can\ntake one of the following special values: \"16\", \"256\" to restrict the use of colors to\nthe base 16 or 256 ANSI colors, respectively. This can be specified to override the\nautomatic decision based on $TERM and what the console is connected to.\n\n$SYSTEMDURLIFY\nThe value must be a boolean. Controls whether clickable links should be generated in the\noutput for terminal emulators supporting this. This can be specified to override the\ndecision that systemd makes based on $TERM and other conditions.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "systemd(1), locale(7), locale.conf(5), vconsole.conf(5), loadkeys(1), kbd(4), The XKB\nConfiguration Guide[1], systemctl(1), systemd-localed.service(8), systemd-firstboot(1),\nmkinitrd(8)\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. The XKB Configuration Guide\nhttp://www.x.org/releases/current/doc/xorg-docs/input/XKB-Config.html\n\n\n\nsystemd 249                                                                             LOCALECTL(1)",
                "subsections": []
            }
        }
    }
}