LC_CTYPE: cannot change locale (UTF-8)

When connect to centos machine with ssh, you can get below warning.

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

You need to set environment variable for encoding. Add below lines to /etc/environment file.

 

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Source: https://gist.github.com/ibrahimlawal/bfec7092cb64d46d8f9d1fd2c0c3d9c8

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.