Quickly discover which locales are installed and which one the system actually uses. 15.12.2025 | reading time: 2 min Locales shape date, time, number formats and string sorting; a misconfigured locale breaks displays and scripts, so learn to inspect what is installed and what is active. Try this on a server If characters look wrong, run `locale -a` to list installed locales (example output: `C, C.UTF-8, en_US.utf8, de_DE.utf8`), then run `locale` to see active variables (example: `LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_ALL=`) and `localectl status` to check the systemd-managed locale (example line: `System Locale: LANG=en_US.UTF-8`). Hands-on fixes and checks Generate or enable missing locales with `sudo locale-gen en_US.UTF-8` or on Debian use `sudo dpkg-reconfigure locales`, inspect locale keyword values with `locale -k LC_TIME`, and test reproducible behavior with `LC_ALL=C your-command` to force the POSIX "C" locale for diagnostics. When to use which tool Use `locale -a` to enumerate installed locales, `locale` to view the process environment, `localectl` to query or set system-wide settings on systemd hosts, and distro tools like `locale-gen` or `dpkg-reconfigure locales` to create missing entries. Next steps Mastering locale inspection helps debug encoding, sorting and formatting problems quickly; keep exploring system localization and consider deeper Linux certification training such as CompTIA Linux+ or LPIC-1 with focused preparation at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup utilities troubleshooting scripting