Skip to content

Instantly share code, notes, and snippets.

@letranloc
Forked from tomysmile/rpi-configure-locales.md
Last active June 25, 2022 09:42
Show Gist options
  • Save letranloc/5d8156855d508914733170272eb7ba66 to your computer and use it in GitHub Desktop.
Save letranloc/5d8156855d508914733170272eb7ba66 to your computer and use it in GitHub Desktop.
Raspberry Pi: Reconfigure Locales

Reconfigure your RPi Locales

First you need to install the locales you want:

sudo dpkg-reconfigure locales

Then refresh your current environment:

export LANGUAGE=en_GB.UTF-8
export LANG=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
sudo locale-gen en_GB.UTF-8

If you see these errors (on Jessie Lite) follow the next step

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

Open your environment file

sudo nano /etc/environment

Add these lines

LC_ALL=en_GB.UTF-8
LANG=en_GB.UTF-8

Ctrl+X, Y and Enter to Save

That's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment