May 212013
 
Article Server Administration

On a Linux system, the locale determines the encoding used to display text, the formatting of dates and currencies, the character set, etc.

Using dpkg-reconfigure

The easiest way to configure the system locale is using the “dpkg-reconfigure” command in the “debconf” package, included in many Linux distros.

1. Install debconf, if required:

2. Execute dpkg-reconfigure locales.

The system displays a screen where we can choose the locales we want to be available. Then, in a second screen we choose the default locale.

Using locale-gen

Alternatively, without having to install the debconf package, we can just edit the file “/etc/locale.gen”, to add the names of the locales we want. Then we simply run the command “/usr/sbin/locale-gen”.

Example file /etc/locale.gen:

 Posted by at 3:17 pm

 Leave a Reply

(required)

(required)