Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

One of the basic steps in setting up a new system is getting the right glibc locale files generated. At least in ArchLinux and Gentoo, one is expected to do this step by hand. I am trying to setup a script that deploys ArchLinux. For various reasons, my script is limited by not knowing where in the config process it is and testing for each step as it goes along. The process includes several reboots.

Throwing the right locale into /etc/locale.gen and running local-gen every time doesn't seem to hurt, but on the embeded platform I'm using it takes a long time and running this several times really hurts.

What would be the proper way to test this -- not just that a locale is set in the config but that the proper files for it are generated?

share|improve this question
up vote 3 down vote accepted

/usr/bin/locale -a prints the list of already generated locales found in /usr/lib/locale/locale-archive. (and the POSIX and C locale)

$ locale -a
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.