{
    "mode": "man",
    "parameter": "LOCALE",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/LOCALE/1/json",
    "generated": "2026-06-03T04:25:20Z",
    "synopsis": "locale [option]\nlocale [option] -a\nlocale [option] -m\nlocale [option] name...",
    "sections": {
        "NAME": {
            "content": "locale - get locale-specific information\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "locale [option]\nlocale [option] -a\nlocale [option] -m\nlocale [option] name...\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The locale command displays information about the current locale, or all locales, on standard\noutput.\n\nWhen invoked without arguments, locale displays the current locale settings for  each  locale\ncategory (see locale(5)), based on the settings of the environment variables that control the\nlocale (see locale(7)).  Values for variables set in the environment are printed without dou‐\nble quotes, implied values are printed with double quotes.\n\nIf either the -a or the -m option (or one of their long-format equivalents) is specified, the\nbehavior is as follows:\n",
            "subsections": [
                {
                    "name": "-a --all-locales",
                    "content": "Display a list of all available locales.  The -v option causes  the  LCIDENTIFICATION\nmetadata about each locale to be included in the output.\n",
                    "flag": "-a",
                    "long": "--all-locales"
                },
                {
                    "name": "-m --charmaps",
                    "content": "Display the available charmaps (character set description files).  To display the cur‐\nrent character set for the locale, use locale -c charmap.\n\nThe locale command can also be provided with one or more arguments, which are  the  names  of\nlocale  keywords (for example, datefmt, ctype-class-names, yesexpr, or decimalpoint) or lo‐\ncale categories (for example, LCCTYPE or LCTIME).  For each argument, the following is dis‐\nplayed:\n\n*  For a locale keyword, the value of that keyword to be displayed.\n\n*  For a locale category, the values of all keywords in that category are displayed.\n\nWhen arguments are supplied, the following options are meaningful:\n",
                    "flag": "-m",
                    "long": "--charmaps"
                },
                {
                    "name": "-c --category-name",
                    "content": "For a category name argument, write the name of the locale category on a separate line\npreceding the list of keyword values for that category.\n\nFor a keyword name argument, write the name of the locale category for this keyword on\na separate line preceding the keyword value.\n\nThis  option  improves readability when multiple name arguments are specified.  It can\nbe combined with the -k option.\n",
                    "flag": "-c",
                    "long": "--category-name"
                },
                {
                    "name": "-k --keyword-name",
                    "content": "For each keyword whose value is being displayed, include also the name  of  that  key‐\nword, so that the output has the format:\n\nkeyword=\"value\"\n\nThe locale command also knows about the following options:\n",
                    "flag": "-k",
                    "long": "--keyword-name"
                },
                {
                    "name": "-v --verbose",
                    "content": "Display additional information for some command-line option and argument combinations.\n\n-?, --help\nDisplay a summary of command-line options and arguments and exit.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "--usage",
                    "content": "Display a short usage message and exit.\n",
                    "long": "--usage"
                },
                {
                    "name": "-V --version",
                    "content": "Display the program version and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "FILES": {
            "content": "/usr/lib/locale/locale-archive\nUsual default locale archive location.\n\n/usr/share/i18n/locales\nUsual default path for locale definition files.\n",
            "subsections": []
        },
        "CONFORMING TO": {
            "content": "POSIX.1-2001, POSIX.1-2008.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "$ locale\nLANG=enUS.UTF-8\nLCCTYPE=\"enUS.UTF-8\"\nLCNUMERIC=\"enUS.UTF-8\"\nLCTIME=\"enUS.UTF-8\"\nLCCOLLATE=\"enUS.UTF-8\"\nLCMONETARY=\"enUS.UTF-8\"\nLCMESSAGES=\"enUS.UTF-8\"\nLCPAPER=\"enUS.UTF-8\"\nLCNAME=\"enUS.UTF-8\"\nLCADDRESS=\"enUS.UTF-8\"\nLCTELEPHONE=\"enUS.UTF-8\"\nLCMEASUREMENT=\"enUS.UTF-8\"\nLCIDENTIFICATION=\"enUS.UTF-8\"\nLCALL=\n\n$ locale datefmt\n%a %b %e %H:%M:%S %Z %Y\n\n$ locale -k datefmt\ndatefmt=\"%a %b %e %H:%M:%S %Z %Y\"\n\n$ locale -ck datefmt\nLCTIME\ndatefmt=\"%a %b %e %H:%M:%S %Z %Y\"\n\n$ locale LCTELEPHONE\n+%c (%a) %l\n(%a) %l\n11\n1\nUTF-8\n\n$ locale -k LCTELEPHONE\ntelintfmt=\"+%c (%a) %l\"\nteldomfmt=\"(%a) %l\"\nintselect=\"11\"\nintprefix=\"1\"\ntelephone-codeset=\"UTF-8\"\n\nThe following example compiles a custom locale from the ./wrk directory with the localedef(1)\nutility under the $HOME/.locale directory, then tests the result with  the  date(1)  command,\nand  then  sets  the environment variables LOCPATH and LANG in the shell profile file so that\nthe custom locale will be used in the subsequent user sessions:\n\n$ mkdir -p $HOME/.locale\n$ I18NPATH=./wrk/ localedef -f UTF-8 -i fiSE $HOME/.locale/fiSE.UTF-8\n$ LOCPATH=$HOME/.locale LCALL=fiSE.UTF-8 date\n$ echo \"export LOCPATH=\\$HOME/.locale\" >> $HOME/.bashrc\n$ echo \"export LANG=fiSE.UTF-8\" >> $HOME/.bashrc\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "localedef(1), charmap(5), locale(5), locale(7)\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This page is part of release 5.10 of the Linux  man-pages  project.   A  description  of  the\nproject,  information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-06-09                                    LOCALE(1)",
            "subsections": []
        }
    },
    "summary": "locale - get locale-specific information",
    "flags": [
        {
            "flag": "-a",
            "long": "--all-locales",
            "arg": null,
            "description": "Display a list of all available locales. The -v option causes the LCIDENTIFICATION metadata about each locale to be included in the output."
        },
        {
            "flag": "-m",
            "long": "--charmaps",
            "arg": null,
            "description": "Display the available charmaps (character set description files). To display the cur‐ rent character set for the locale, use locale -c charmap. The locale command can also be provided with one or more arguments, which are the names of locale keywords (for example, datefmt, ctype-class-names, yesexpr, or decimalpoint) or lo‐ cale categories (for example, LCCTYPE or LCTIME). For each argument, the following is dis‐ played: * For a locale keyword, the value of that keyword to be displayed. * For a locale category, the values of all keywords in that category are displayed. When arguments are supplied, the following options are meaningful:"
        },
        {
            "flag": "-c",
            "long": "--category-name",
            "arg": null,
            "description": "For a category name argument, write the name of the locale category on a separate line preceding the list of keyword values for that category. For a keyword name argument, write the name of the locale category for this keyword on a separate line preceding the keyword value. This option improves readability when multiple name arguments are specified. It can be combined with the -k option."
        },
        {
            "flag": "-k",
            "long": "--keyword-name",
            "arg": null,
            "description": "For each keyword whose value is being displayed, include also the name of that key‐ word, so that the output has the format: keyword=\"value\" The locale command also knows about the following options:"
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Display additional information for some command-line option and argument combinations. -?, --help Display a summary of command-line options and arguments and exit."
        },
        {
            "flag": "",
            "long": "--usage",
            "arg": null,
            "description": "Display a short usage message and exit."
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "Display the program version and exit."
        }
    ],
    "examples": [
        "$ locale",
        "LANG=enUS.UTF-8",
        "LCCTYPE=\"enUS.UTF-8\"",
        "LCNUMERIC=\"enUS.UTF-8\"",
        "LCTIME=\"enUS.UTF-8\"",
        "LCCOLLATE=\"enUS.UTF-8\"",
        "LCMONETARY=\"enUS.UTF-8\"",
        "LCMESSAGES=\"enUS.UTF-8\"",
        "LCPAPER=\"enUS.UTF-8\"",
        "LCNAME=\"enUS.UTF-8\"",
        "LCADDRESS=\"enUS.UTF-8\"",
        "LCTELEPHONE=\"enUS.UTF-8\"",
        "LCMEASUREMENT=\"enUS.UTF-8\"",
        "LCIDENTIFICATION=\"enUS.UTF-8\"",
        "LCALL=",
        "$ locale datefmt",
        "%a %b %e %H:%M:%S %Z %Y",
        "$ locale -k datefmt",
        "datefmt=\"%a %b %e %H:%M:%S %Z %Y\"",
        "$ locale -ck datefmt",
        "LCTIME",
        "datefmt=\"%a %b %e %H:%M:%S %Z %Y\"",
        "$ locale LCTELEPHONE",
        "+%c (%a) %l",
        "(%a) %l",
        "11",
        "UTF-8",
        "$ locale -k LCTELEPHONE",
        "telintfmt=\"+%c (%a) %l\"",
        "teldomfmt=\"(%a) %l\"",
        "intselect=\"11\"",
        "intprefix=\"1\"",
        "telephone-codeset=\"UTF-8\"",
        "The following example compiles a custom locale from the ./wrk directory with the localedef(1)",
        "utility under the $HOME/.locale directory, then tests the result with  the  date(1)  command,",
        "and  then  sets  the environment variables LOCPATH and LANG in the shell profile file so that",
        "the custom locale will be used in the subsequent user sessions:",
        "$ mkdir -p $HOME/.locale",
        "$ I18NPATH=./wrk/ localedef -f UTF-8 -i fiSE $HOME/.locale/fiSE.UTF-8",
        "$ LOCPATH=$HOME/.locale LCALL=fiSE.UTF-8 date",
        "$ echo \"export LOCPATH=\\$HOME/.locale\" >> $HOME/.bashrc",
        "$ echo \"export LANG=fiSE.UTF-8\" >> $HOME/.bashrc"
    ],
    "see_also": [
        {
            "name": "localedef",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/localedef/1/json"
        },
        {
            "name": "charmap",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/charmap/5/json"
        },
        {
            "name": "locale",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/locale/5/json"
        },
        {
            "name": "locale",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/locale/7/json"
        }
    ]
}