All our GNU/Linux images are configured to use English by default. You may want to configure another language if, for example, you send emails containing dates, since dates will appear in English by default. However, changing this is very simple, and we will explain how below.
The first thing we will do is connect to our server via SSH:
# ssh root@IP_servidor
We will need to install the language packs located in the /usr/share/locales directory. To do this, type the following in the terminal:
# cd /usr/share/locales && ./install-language-pack es_ES
Edit the /etc/environment and /etc/default/locale files and add the following content to both:
LANG="es_ES.UTF-8"
LC_ALL="es_ES.UTF-8"
LANGUAGE="es_ES"
Once we have edited the files, we will need to reconfigure the locales package to add the newly installed language:
# dpkg-reconfigure locales
And select es_ES ISO-8859-1 and es_ES.UTF-8 UTF-8:
And select the language pack that we configured in the files:
Once we have done this, it will generate the locales, and output like this should appear:
# dpkg-reconfigure locales
Generating locales (this might take a while)...
en_AG.UTF-8... done
en_AU.UTF-8... done
en_BW.UTF-8... done
en_CA.UTF-8... done
en_DK.UTF-8... done
en_GB.UTF-8... done
en_HK.UTF-8... done
en_IE.UTF-8... done
en_IN.UTF-8... done
en_NG.UTF-8... done
en_NZ.UTF-8... done
en_PH.UTF-8... done
en_SG.UTF-8... done
en_US.UTF-8... done
en_ZA.UTF-8... done
en_ZM.UTF-8... done
en_ZW.UTF-8... done
es_ES.ISO-8859-1... done
es_ES.UTF-8... done
Generation complete.
Now, to apply the changes, we need to restart the server:
# reboot
When we connect again, we will see that it is now set to es_ES:
# locale
LANG=es_ES.UTF-8
LANGUAGE=es_ES
LC_CTYPE="es_ES.UTF-8"
LC_NUMERIC="es_ES.UTF-8"
LC_TIME="es_ES.UTF-8"
LC_COLLATE="es_ES.UTF-8"
LC_MONETARY="es_ES.UTF-8"
LC_MESSAGES="es_ES.UTF-8"
LC_PAPER="es_ES.UTF-8"
LC_NAME="es_ES.UTF-8"
LC_ADDRESS="es_ES.UTF-8"
LC_TELEPHONE="es_ES.UTF-8"
LC_MEASUREMENT="es_ES.UTF-8"
LC_IDENTIFICATION="es_ES.UTF-8"
LC_ALL=es_ES.UTF-8