oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


locale [options] [name]

Print report on current locale settings. Locales determine the country-specific settings for a system, including character encodings, the formatting of dates, honorifics, diagnostic messages, currency, printer-paper sizes, and default measurements. Locale settings are essentially a dictionary of settings specified by keyword. The keywords are grouped together into related categories whose names begin with LC_. Each category has a related environment variable of the same name from which it will read its locale setting. Supply keyword or category names as name to examine their values. Multiple names may be given. You can also use the special keyword charmap to see the current character mapping. When executed with no arguments, locale prints the value of all locale-related environment variables.



Print all available locale settings installed on the system.


Print the category related to each name argument.


Print keywords along with their settings for each name argument.


Print all available character maps.

Environment variables


The default value for unset internationalization variables. If not set, the system's default value is used.


Postal settings, country, and language names and abbreviation.


String and character sorting and comparison settings.


Character attributes, including case conversion mappings, and categories of characters (whitespace, digit, lower, upper, punctuation, etc.).


Information related to the current locale definition, including its title, source, revision, and contact information for its author.


Measurement units, metric or other.


Settings for yes/no prompts and other informative and diagnostic messages.


Currency formats and symbols.


Formats for names and honorifics.


Nonmonetary number formats.


Default paper sizes for printing and pagination.


Telephone number formats.


Date and time formats.


When set, overrides the values of all other internationalization variables.


The path for finding message catalogs used in processing messages.


Print the category name and all keywords for date and time settings:

locale -ck LC_TIME

Print the strings used for days of the week and months of the year:

locale day mon

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: