Skip to content

Instantly share code, notes, and snippets.

@dkdndes
Forked from tomysmile/rpi-configure-locales.md
Created February 10, 2022 14:10
Show Gist options
  • Save dkdndes/f1e40f6d3fab10be0e4cd1e7946a63aa to your computer and use it in GitHub Desktop.
Save dkdndes/f1e40f6d3fab10be0e4cd1e7946a63aa 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_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.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_US.UTF-8
LANG=en_US.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