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. 它是最流行的开源,高级键值缓存和存储之一. ...
随机推荐
- UIActionSheet 这样写为什么显示为空白 ???
func pickePhotoFromSheet() { var sheet:UIActionSheet = UIActionSheet() var button = UIButton.button ...
- Cacti中文版在Centos上的安装
最近老有人问Cacti中文版在哪下载啊怎么安装啊,我在这里一遍给大家讲解了:Cacti中文版在Centos上的安装 1.基本安装 cacti是运作在apache+php+mysql+net-snmp工 ...
- JQuery增删改查
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- EF实体框架常见问题
1,无法为具有固定名称“System.Data.SqlClient”的 ADO.NET 提供程序加载在应用程序配置文件中注册的实体框架提供程序类型“System.Data.Entity.SqlServ ...
- sgu-508 Black-white balls 概率-贝叶斯公式
题意:有n个球,其中有0.1.2...n个黑球的概率是相等的,现在从中取出L个球,p个黑球q个白球.现在问猜一个黑球的区间,使得落在这个区间的概率大于给定的一个数值. 详见代码: #include & ...
- hibernate对象关系实现(二)一对一
双向一对一以部门和经理为例: a.部门和经理类中各自由对方的引用:(省略了get/set方法) b.数据库两种方式实现:一种(b.1)是外键映射,并将外键添加唯一约束(至于哪个对象的主键做外键,可随意 ...
- lab_c!
#include<stdio.h> hi() { printf("hello world!\n"); } int main() { hi(); int i = hi() ...
- 优秀c++开源项目集合
本文会持续更新, 我希望通过这篇文章把我看到过的优秀开源项目记录下来, 有时间仔细阅读. cockroachdb 前googler开发的开源的spanner数据库: https://github.co ...
- (linux) 常用命令 干货
内容提要 1. 第一难度, 重要 梯队 (grep, awk, sed, find, ) 2. 第二常用, 重要 梯队 (ps, ls, date, fuser, netstat, kill) 3. ...
- Mysql 允许null 与 default值
分为下面4种情况: 1.允许null, 指定default值. 2.允许null, 不指定default,这个时候可认为default值就是null 3.不允许null,指定default值,不能指定 ...