LOCALE.CONF(5)

๐Ÿ’– LOCALE.CONF(5) ๐Ÿ’–

okay bestie, so this is the manual for locale.conf โ€” the configuration file for locale settings. she's a section 5 page (that's the file-formats girlies), and honestly? she's doing so much for your system and gets zero credit. let's fix that. โœจ


๐ŸŒธ NAME ๐ŸŒธ

locale.conf โ€” configuration file for locale settings

like. the whole personality of your machine's language settings lives here. that's her. that's the vibe.


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

/etc/locale.conf

one file. that's it. no flags, no drama, just a path. iconic behavior honestly. ๐Ÿ’…


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so the /etc/locale.conf file configures system-wide locale settings. and when we say system-wide we mean it โ€” this file gets read at early boot by systemd(1), like literally first thing in the morning before anyone's had coffee. โ˜•

the format? it's a newline-separated list of environment-like, shell-compatible variable assignments. you ignore comments and empty lines (they're just background noise, not the main character). and yes, you can source the configuration from shell scripts โ€” but lowkey that's where the shell stuff ends. beyond mere variable assignments, no shell features are supported. that's on purpose btw, so applications can read the file without having to implement a whole shell-compatible execution engine. very demure, very mindful. ๐Ÿงš

if you want the full detailed description of this format, go read os-release(5). she explains it better than i ever could. ๐Ÿซถ

๐Ÿ“Œ heads up bestie: the kernel command line options locale.LANG=, locale.LANGUAGE=, locale.LC_CTYPE=, locale.LC_NUMERIC=, locale.LC_TIME=, locale.LC_COLLATE=, locale.LC_MONETARY=, locale.LC_MESSAGES=, locale.LC_PAPER=, locale.LC_NAME=, locale.LC_ADDRESS=, locale.LC_TELEPHONE=, locale.LC_MEASUREMENT=, locale.LC_IDENTIFICATION= can be used to override the locale settings at boot. so if something's not sticking, check the kernel command line, bestie, i'm telling you. ๐Ÿ˜ญ

the locale settings you put in /etc/locale.conf are system-wide and get inherited by every service or user โ€” everybody eats ๐Ÿ“ โ€” unless they're overridden or unset by individual programs or users. yes, some programs are rebels. it happens.

depending on your operating system, other configuration files might be checked for locale configuration too โ€” but only as a fallback. so they're the understudy. the backup dancer. the second choice. ๐Ÿ’€

also, fun facts: /etc/locale.conf can be updated using systemd-localed.service(8). and localectl(1) can be used to alter the settings in this file during runtime from the command line (no reboot, no waiting, we love efficiency โœจ). and if you're customizing a mounted-but-not-booted system image, that's systemd-firstboot(1)'s whole moment. ๐ŸŒˆ


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

the following locale settings may be set using /etc/locale.conf. one bullet each because we respect each of them individually:

  • LANG= โ€” the big one, the main character setting ๐Ÿ’œ
  • LANGUAGE= โ€” you can set this one too, she's valid
  • LC_CTYPE= โ€” settable here, go off
  • LC_NUMERIC= โ€” yes, numbers have opinions about formatting
  • LC_TIME= โ€” dates and times, she's got range
  • LC_COLLATE= โ€” sorting order, lowkey underrated
  • LC_MONETARY= โ€” money formatting, highkey important ๐Ÿ’ธ
  • LC_MESSAGES= โ€” the language your messages come in, very useful
  • LC_PAPER= โ€” paper size, yes really, it's here
  • LC_NAME= โ€” name formatting
  • LC_ADDRESS= โ€” address formatting
  • LC_TELEPHONE= โ€” phone number formatting, so specific, we love her
  • LC_MEASUREMENT= โ€” metric vs imperial, the eternal debate โญ
  • LC_IDENTIFICATION= โ€” the metadata one
๐Ÿšจ important caveat, no cap: note that LC_ALL may not be configured in this file. don't try it. she's not allowed in the group chat. ๐Ÿšซ

for details about the meaning and semantics of these settings, refer to locale(7). she's the deep lore. ๐Ÿ“–


๐Ÿ’ซ EXAMPLE ๐Ÿ’ซ

Example 1. German locale with English messages

here's the moment you've all been waiting for. /etc/locale.conf:

# Custom settings

LANG=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8

so the system speaks German but the messages come in English. bilingual queen behavior, fr fr. ๐Ÿ‡ฉ๐Ÿ‡ช๐Ÿ‡บ๐Ÿ‡ธ


๐ŸŒŸ SEE ALSO ๐ŸŒŸ


and that's the whole page, bestie!! ๐ŸŽ€ you now know locale.conf better than 99% of people who've been using Linux for a decade. go forth and configure your locales with confidence. ๐Ÿ’…โœจ

systemd 262.1 ยท LOCALE.CONF(5) โ€” mwah, love u, bye!! ๐Ÿ’–๐Ÿฆ‹๐ŸŒธ

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms