Locale check and change --localectl command
You can check and change the locale with the localectl command . Locale specifies which country's language to output to the screen and which character code to output when there is locale-compatible software.
When building a Web system development environment with Perl, I feel that the default settings are fine and unnecessary for the locale settings.
The reason is that Perl programming language is OS flat and locale flat in terms of character code.
(It is unconfirmed as of May 13, 2020 whether it is really okay.)
Locale confirmation
You can check the current locale with the localectl command.
localectlctl
The currently set locale is displayed as shown below. The default is "C.UTF-8". In the initial installation state, the shell can input and output in UTF-8.
System Locale: LANG = C.UTF-8 VC Keymap: n / a X11 Layout: us X11 Model: pc105
List of available locales
Use the "localectl list-locales" command to see a list of available locales.
localectl list-locales
C.UTF-8 en_US.utf8
Apparently there is no locale available in Japanese.
Locale installation
Let's install the locale. Download the Japanese package with the apt command. Run with administrator privileges using sodo.
sudo apt install language-pack-ja
Check the available locales again.
localectl list-locales </pre> "Ja_JP.utf8" has been added. <pre> C.UTF-8 en_US.utf8 ja_JP.utf8
Change locale
Let's change the locale. Use the "localectl set-locale" command to change the locale. Execute with administrator privileges using the sudo command.
sudo localectl set-locale LANG = ja_JP.UTF-8