Pawan Bahuguna

Let's Learn and Share
Menu
  • Home
  • Free Books
  • RHEL 7 Books
  • Practice Papers
  • Contact
  • Privacy

Preparing for RHCSA or RHCE Certification? >>> Check RHEL 7 : RHCSA & RHCE Practice Papers

YES, Show Me Sample Papers.
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.

Advertisements
[[email protected] ~]# cat /etc/locale.conf 
LANG="en_IN.UTF-8"
[[email protected] ~]# 

OR

[[email protected] ~]# 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“.

[[email protected] ~]# vi /etc/locale.conf 
LANG="en_US.iso88591"
:wq
[[email protected] ~]# cat /etc/locale.conf
LANG="en_US.iso88591"
[[email protected] ~]# 

 

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

[[email protected] ~]# localectl set-locale LANG=en_US.iso88591
[[email protected] ~]# cat /etc/locale.conf
LANG=en_US.iso88591
[[email protected] ~]# 

 

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.

[[email protected] ~]# 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.

Show your love by Sharing:

  • Click to share on Facebook (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • More
  • Click to share on Telegram (Opens in new window)
  • Click to print (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to share on Pocket (Opens in new window)
Share
Pinterest
Linkedin
Tweet
Google+
Stumble
Email
Prev Article
Next Article

Related Articles

Use Linux CLI on Android Phone
Are you a UNIX or Linux lover like me? If …

Love Linux Terminal? You Will Love This Android Phone Launcher Too

Things You Should Know About Red Hat Enterprise Linux 8
If you are a Linux lover then here is an …

7 Things You Should Know About Red Hat Enterprise Linux 8

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

Leave a Reply

Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 

Find a domain starting at $0.48

powered by Namecheap

Like Our Book

Like Our Book

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 © 2023 Pawan Bahuguna
Home | Privacy Policy | Contact