- Published on
AWS EC2 Linux - warning: setlocale: LC_CTYPE: cannot change locale UTF-8
- Authors
- Name
- Ruan Bekker
- @ruanbekker
On Amazon Linux EC2 Instances, I noticed the following error when SSH onto them:
-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
To resolve, add the following to the /etc/environment
file:
$ cat /etc/environment
LANG=en_US.utf-8
LC_ALL=en_US.utf-8
Logout and log back in and it should be resolved.
Thank You
Thanks for reading, feel free to check out my website, and subscribe to my newsletter or follow me at @ruanbekker on Twitter.
- Linktree: https://go.ruan.dev/links
- Patreon: https://go.ruan.dev/patreon