Skip to content

Instantly share code, notes, and snippets.

@tomysmile
Last active June 29, 2023 14:37
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save tomysmile/c006fcc9198f509908e5 to your computer and use it in GitHub Desktop.
Save tomysmile/c006fcc9198f509908e5 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