How to get system encoding under Linux

Well, the problem is that you want to know what is the current system encoding under your linux server, but it’s not a system setting, rather a terminal setting. To know which is the terminal encoding just type:

echo $LC_CTYPE

If you want to know the terminal language type:

echo $LANG

To list all the configuration, just type:


And, least but not last, if you want to change the encoding type:

export LC_ALL=en_US.UTF-8
export LANG="$LC_ALL"