CentOS 7 /RHEL 7: How To Change The System Locale
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的更多相关文章
- 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 ...
- 在CentOS或RHEL上安装Nux Dextop仓库
介绍 Nux Dextop是类似CentOS.RHEL.ScientificLinux的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux Dextop对CentOS/RHEL ...
- CentOS 7 (RHEL 7)服务管理命令的变化
CentOS 7 (RHEL 7)带来了新的服务管理命令,为了保持兼容原有的命令仍可以使用,以下是新旧命令的对照. 启动.停止.重启.重载.检查服务:6: service httpd start|st ...
- 在CentOS或RHEL防火墙上开启端口
转载自:https://linux.cn/article-4243-1.html 如果希望在服务器上提供服务,诸如CentOS或RHEL的企业级Linux发行版包含内置的强大防火墙,它们默认的防火墙规 ...
- 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 ...
- CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin
原文 CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin 发表于 2014-11-02 作者 Haoxian Zeng 更新于 2014-12-12 之前根据在 Lin ...
- 如何在CentOS或者RHEL上启用Nux Dextop仓库 安装shutter截图工具
Nux Dextop是一个面对CentOS.RHEL.ScientificLinux的含有许多流行的桌面和多媒体相关的包的第三方RPM仓库(比如:Ardour,Shutter等等).目前,Nux De ...
- Linux系统忘记管理员密码(CentOS、RHEL、Ubuntu)
Linux系统忘记管理员密码(CentOS.RHEL.Ubuntu) 系统使用过程中,尤其是生产环境中.万一忘记管理员密码,该怎么办?是不是很绝望? 1.RHEL 7.0 重启主机进入引导界面键入e键 ...
- How to install redis server on CentOS 7 / RHEL 7
在本教程中,我们将学习如何在CentOS 7 / RHEL 7上安装Redis服务器. redis的缩写是REmote DIctionary Server. 它是最流行的开源,高级键值缓存和存储之一. ...
随机推荐
- 关于mysqli_fetch_assoc的一点说明
关于mysqli_fetch_assoc的一点说明 如下2种用法是错误的: 错误1 .... $fetchResult = mysqli_fetch_assoc($queryResult); ...
- Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle Forms
Whenever we commit after entering data in Oracle Forms, many triggers fires during this event and al ...
- ABAP Enhancement:第一部分
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- [Effective Java]第四章 类和接口
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- Linux 下常用解压命令(转载)
Linux下常用文件解压(包括rpm.deb包) Linux下怎么解后缀名是gzip的文件?1.以.a为扩展名的文件:#tar xv file.a2.以.z为扩展名的文件:#uncompress fi ...
- JS——ajax login test
1.新建一个webproject,我用的是myeclipse10,建立如下的LoginServlet.java文件 2.编写java文件 import java.io.IOException; imp ...
- iOS案例:读取指定txt文件,并把文件中的内容输出出来
用到的是NSString中的initWithContentsOfFile: encoding方法 // // main.m // 读取指定文件并输出内容 // // Created by Apple ...
- Perl5中19个最重要的文件系统工具
在写脚本处理文件系统时,经常需要加载很多模块.其中好多有用函数分散在各种不同的模块中.它们有些是Perl的内置函数,有些是在同Perl一起发行的标准模块中,另外一些是通过CPAN安装的. 下面来看15 ...
- LINQ之路 2:C# 3.0的语言功能(上)
在上一篇的LINQ介绍中,我们已经看到了隐式类型变量var,扩展方法(extension method)和lambda表达式的身影.没错,他们正是LINQ技术的基石,是他们让LINQ的实现成为可能,并 ...
- T-SQL排名函数
提到排名函数我们首先可能想到的是order by,这个是排序,不是排名,排名需要在前面加个名次序号的,order by是没有这个功能的.还可能会想到identity(1,1),它也给了一个序号,但是不 ...