The system localeare used to control the language setting of system services and the UI before the user logs in. How Do I change the default system locale in CentOS 7 linux system? How to check the current locate setting under centos 7 or RHEL 7 ? How to get the list of all available locales in current linux system? In this post you will see that how to set the system locale.

CentOS 7/ RHEL 7 Check Current System Locale Settings

To show the current locale settings, you can view the “/etc/locale.conf” configuration file via “cat /etc/locale.conf” command or issue the following “localectl status” command.

1

2

3

cat / etc / locale.conf

OR

localectl status

Output:

1

2

3

4

5

6

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

LANG =es_US.utf8

[ root @ devops ~ ] # localectl status

System Locale: LANG =es_US.utf8

VC Keymap: us

X11 Layout: us

CentOS 7 / RHEL 7 List All Available Locales

Before changing the system locale, you must know that which locales are available on the current system, issue the following command:

localectl list-locales

Example: If you want to select a EN_US locale, then you can list all EN_US locales by issue the following command:

localectl list-locales | grep en_US

Outputs:

1

2

3

4

5

[ root @ devops ~ ] # localectl list-locales | grep en_US

en_US

en_US.iso88591

en_US.iso885915

en_US.utf8

CentOS 7 / RHEL Change The System Locale

There are two ways to change the system locale by through modifying the “/etc/locale.conf” configuration file or using a new command “localect” which is newly added in centos 7 or RHEL 7 operating system.

Edit “/etc/locale.conf” file using “vim” command and search “LANG” line and change its value as what you want to select the locale. such as: change locale to “en_us.iso88591″.vim /etc/locale.conf

Before:

LANG =es_US.utf8

After:

LANG =en_US.iso88591

Save and exit the above configuration file and reboot the system, then the changes will take effect.

# Set the system locale via localectl command

To set the default system locale, you can use the following command:

localectl set-locale LANG = < locale name >

you need to replace the locale name as you want to select the locale.

Example: changing the default locale to german locale, issue the following command:

localectl set-locale LANG =de_DE.UTF- 8

Outputs:

1

2

3

4

5

[ root @ devops ~ ] # localectl set-locale LANG=de_DE.UTF-8

[ root @ devops ~ ] # localectl status

System Locale: LANG =de_DE.UTF- 8

VC Keymap: us

X11 Layout: us

Note:you must log on the system with root user to run localectl command .

CentOS 7 /RHEL 7: How To Change The System Locale的更多相关文章

  1. centos install shutter (How to enable Nux Dextop repository on CentOS or RHEL)

    http://ask.xmodulo.com/enable-nux-dextop-repository-centos-rhel.html Question: I would like to insta ...

  2. 在CentOS或RHEL上安装Nux Dextop仓库

    介绍 Nux Dextop是类似CentOS.RHEL.ScientificLinux的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux Dextop对CentOS/RHEL ...

  3. CentOS 7 (RHEL 7)服务管理命令的变化

    CentOS 7 (RHEL 7)带来了新的服务管理命令,为了保持兼容原有的命令仍可以使用,以下是新旧命令的对照. 启动.停止.重启.重载.检查服务:6: service httpd start|st ...

  4. 在CentOS或RHEL防火墙上开启端口

    转载自:https://linux.cn/article-4243-1.html 如果希望在服务器上提供服务,诸如CentOS或RHEL的企业级Linux发行版包含内置的强大防火墙,它们默认的防火墙规 ...

  5. Ajaxterm-0.10-8.el5.noarch.rpm CentOS 5 (RHEL 5) Download

    Ajaxterm-0.10-8.el5.noarch.rpm CentOS 5 (RHEL 5) Download Install Howto Download the latest epel-rel ...

  6. CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin

    原文 CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin 发表于 2014-11-02 作者 Haoxian Zeng 更新于 2014-12-12   之前根据在 Lin ...

  7. 如何在CentOS或者RHEL上启用Nux Dextop仓库 安装shutter截图工具

    Nux Dextop是一个面对CentOS.RHEL.ScientificLinux的含有许多流行的桌面和多媒体相关的包的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux De ...

  8. Linux系统忘记管理员密码(CentOS、RHEL、Ubuntu)

    Linux系统忘记管理员密码(CentOS.RHEL.Ubuntu) 系统使用过程中,尤其是生产环境中.万一忘记管理员密码,该怎么办?是不是很绝望? 1.RHEL 7.0 重启主机进入引导界面键入e键 ...

  9. How to install redis server on CentOS 7 / RHEL 7

    在本教程中,我们将学习如何在CentOS 7 / RHEL 7上安装Redis服务器. redis的缩写是REmote DIctionary Server. 它是最流行的开源,高级键值缓存和存储之一. ...

随机推荐

  1. SqlSever基础 rtrim函数 除去字符串的右边的空格,左边中间的不管

    镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...

  2. 【leetcode❤python】171. Excel Sheet Column Number

    #-*- coding: UTF-8 -*- # ord(c) -> integer##Return the integer ordinal of a one-character string. ...

  3. Vi编辑器下使用分屏显示【已自己验证所有】

    :new 水平分割出一个新窗口 :vnew,:vne 垂直分割出一个新窗口 :new+文件路径/文件名; 在新的水平分屏中 载入/新建 文件.[文件存在则载入,不存在则在指定的路径新建,下同] :vn ...

  4. 集成学习(Ensembling Learning)

    集成学习(Ensembling Learning) 标签(空格分隔): 机器学习 Adabost 对于一些弱分类器来说,如何通过组合方法构成一个强分类器.一般的思路是:改变训练数据的概率分布(权值分布 ...

  5. excel在一个图表内,显示折线图和柱状图

      折线图和柱状图,在同一个图表中拆分显示   一个图,设置主坐标轴 另外一个图,设置次坐标轴     拆分,通过调整纵坐标的最小值和最大值来实现     关于图表的标题,选中图表,选择布局,然后图表 ...

  6. 使用OmniGraffle制作原型图

    原型图设计是一个艺术创作的过程,所以我们应当使用能够提高工作效率.激发创作灵感的工具,让工具为创作服务,而不是为创作去学习如何使用工具.从这一点上说,我觉得Mac下的很多软件做的非常好,OmniGra ...

  7. mysql 实现行号的方法——如何获取当前记录所在行号

    SELECT aaa,(@rowNum:=@rowNum+1) AS rowNoFROM tb_bbb,(SELECT (@rowNum :=0) ) bORDER BY tb_bbb.liushui ...

  8. Maven常用命令(转)

    Maven库: http://repo2.maven.org/maven2/ Maven依赖查询: http://mvnrepository.com/ Maven常用命令: 1. 创建Maven的普通 ...

  9. ZOJ-2365 Strong Defence 无公共边割边集

    题意:该题的题意晦涩,勉勉强强听别人说了一遍后再读了一遍题才算懂了题意,题图说的是A国因为B国药进攻自己的国家,于是想办法在联通A-B之间的路径上进行阻击.阻击的舰船停留在一个路径上,舰船上都要放置水 ...

  10. maven使用入门(pom)

    mvn clean complie mvn clean test mvn clean package mvn clean install(该任务将该项目输出的jar安装到了Maven本地仓库中) 各个 ...