Pawan Bahuguna

Let's Learn and Share
Menu
  • Home
  • Certification Guide
  • Tips
  • Disclaimer
  • Privacy
  • Contact

Home
Linux
How to Change Language in RHEL7 / CentOS 7
Linux

How to Change Language in RHEL7 / CentOS 7

Pawan Bahuguna

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.

 

How to Change Locale in RHEL7 CentOS 7

 

System Wide Language Change in RHEL 7 / CentOS 7

 

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


[root@client10 ~]# cat /etc/locale.conf 
LANG="en_IN.UTF-8"
[root@client10 ~]# 

OR

[root@client10 ~]# locale |grep -i lang
LANG=en_IN.UTF-8

 

2. Now, change the language to desired one. In this example, I’m taking “en_US.iso88591“.


[root@client10 ~]# vi /etc/locale.conf 
LANG="en_US.iso88591"
:wq
[root@client10 ~]# cat /etc/locale.conf
LANG="en_US.iso88591"
[root@client10 ~]# 

 

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

[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.

[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/P Truncated
--------------

 

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.

Share
Pinterest
Linkedin
Tweet
Google+
Stumble
Email
Prev Article
Next Article

Related Articles

CentOS 8
Good news for all the Linux lovers as CentOS has …

CentOS 8 Available for Download | How to Install

Must Know Usage of grep Command with Examples
There are lots of commands in Unix/Linux which makes system …

Must Know Usage of “grep” Command with Examples

Tags:How To Linux Linux Basics Redhat Redhat Certification RHCE RHCSA Tutorial

Certifications at Discount

> Certified Kubernetes Security Specialist (CKS)
> Certified Kubernetes Application Developer (CKAD)!
> Certified Kubernetes Administrator (CKA)!
> Linux Networking and Administration (LFS211)
> Monitoring Systems and Services with Prometheus (LFS241)
> More at The Linux Foundation

Lets Connect

  • Popular
  • Recent

Free Newsletter

Subscribe NOW!

We don’t spam! Read our privacy policy for more info.

Check your inbox or spam folder to confirm your subscription.

Pawan Bahuguna

Let's Learn and Share
Copyright © 2025 Pawan Bahuguna
Home | Privacy Policy | Disclaimer | Contact