Skip to content

Instantly share code, notes, and snippets.

@baltpeter
Last active July 5, 2016 11:00
Show Gist options
  • Save baltpeter/a08ee88849441453f212 to your computer and use it in GitHub Desktop.
Save baltpeter/a08ee88849441453f212 to your computer and use it in GitHub Desktop.
Setting up locale correctly on new Ubuntu/Debian servers
apt-get update # if this is the first boot on e.g. OpenVZ containers
apt-get install language-pack-en
update-locale LANG=en_US.UTF-8
shutdown -rf 0 # reboot to ensure new locale is applied
# when lang is "(undefinded)"; also preferred anyway
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment