Skip to content

Instantly share code, notes, and snippets.

@MrSquaare
Created August 9, 2019 14:16
Show Gist options
  • Save MrSquaare/4551e24b94f28eb12be6afda1b247119 to your computer and use it in GitHub Desktop.
Save MrSquaare/4551e24b94f28eb12be6afda1b247119 to your computer and use it in GitHub Desktop.
Script to solve the locale problem on Debian-based systems
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
read -r -p "Enter the locale code [en_US.UTF-8]: " locale
locale=${locale:-en_US.UTF-8}
export LANGUAGE="$locale"
export LANG="$locale"
export LC_ALL="$locale"
locale-gen "$locale"
dpkg-reconfigure locales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment