How to Change Language in RHEL7 / CentOS 7

Language plays a very important role everywhere and if you are not using language you understand, it’s just useless for you to use any system. Similarly, in Linux/Unix servers, we have the option to choose our own locale, though English is an international language, but sometimes there is a need to change the language as per your project need and thus this article focus on showing how you can easily change the language through command line in Red Hat Enterprise Linux 7 (RHEL 7) or CentOS 7.

In my experience, I have seen that many of the system owners want language to be changed. This may be due to application requirement or they want to use their native language.

Language can be changed whole system wide or even for a particular user. You will be surprised to know that the locale can also be set for ssh session also. In this tutorial we will focus on changing the language system wide only.

System Wide Language Change in RHEL 7 / CentOS 7

1. First, check what is the current language of your system by below command.

Alternatively, language can also be changed by using “localectl” command as below.

1

2

3

4

[root@client10~]# localectl set-locale LANG=en_US.iso88591

[root@client10~]# cat /etc/locale.conf

LANG=en_US.iso88591

[root@client10~]#

Now, just logout and login and you will see new locale is effective. For locale change NO REBOOT is required.

TIP: To check what locale are available on your system you can use “localectl” command with “list-locales” option. The list will be long so better sort it out using grep.

1

2

3

4

5

6

7

8

9

10

11

12

[root@client10~]# localectl list-locales |grep en_

en_AG

en_AG.utf8

en_AU

en_AU.iso88591

en_AU.utf8

en_BW

en_BW.iso88591

en_BW.utf8

--------------

O/PTruncated

--------------

Hope, you enjoyed learning how to change locale using command line mode in RHEL 7 and CentOS 7. If you have a question or concern, please let me know through your comments below. If you like the article, do not forget to share it.