duplocale - Linux


duplocale is a powerful command-line tool used to create or update duplicate locales in the system. Locales define cultural settings, including language, currency, number formatting, and time zones. Duplicating a locale allows for quick configuration of new locales without manually setting all the necessary variables.


duplocale [OPTION...] <LOCALE>


  • -n, –no-modify-system: Do not modify system-wide locale files.
  • -r, –recursive: Recursively duplicate all locales in directories below <LOCALE>.
  • -l, –level: Set the depth of the recursive duplication.
  • -h, –help: Display help information.
  • -V, –version: Show version information.


Create a duplicate of the "en_US" locale:

duplocale en_US en_GB

Recursively duplicate all locales in the "/usr/share/locale" directory:

duplocale -r /usr/share/locale

Common Issues

Locale not found: Ensure that the specified locale exists and is valid.

Permission denied: Run duplocale with root privileges if modifying system-wide locale files.

Duplicate locale already exists: Use the -n flag to avoid overwriting existing locales.


Generate locale files for a new language: Combine duplocale with tools like make locale or locale-gen to create language-specific locale files.

Synchronize locales between systems: Use duplocale to create a duplicate set of locales on multiple machines, ensuring consistent cultural settings.

Related Commands

  • locale
  • make locale
  • locale-gen