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 .

时间: 2024-12-11 16:47:04

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 install a RPM package which is available only in Nux Dextop repository. How can I set up Nux Dextop repository on CentOS or RHEL? Nux Dextop is a third-par

CentOS 7 / RHEL 7 : Reset / Recover forgotten root password

CentOS 7 / RHEL 7 : Reset / Recover forgotten root password October 11, 2014 by sharad chhetri 4 Comments In this post we will learn, how to reset / recover forgotten root password on CentOS 7 / RHEL 7 (Red Hat Enterprise Linux 7). On RHEL 5/6 or Cen

CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin

原文 CentOS 7 / RHEL 7 上安装 LAMP + phpMyAdmin 发表于 2014-11-02 作者 Haoxian Zeng 更新于 2014-12-12 之前根据在 Linode VPS 上部署 LAMP 服务器的经验写了安装记录,得到不少网友的亲睐.随着 CentOS 7 发布,安装过程发生了不少变化.因此在虚拟机上跑了一下,根据之前的记录做了修改,以供参考.主要注意的是,现在数据库由 MySQL 改成 MariaDB 了,故而 LAMP 代表的就是 Linux + A

How to install redis server on CentOS 7 / RHEL 7

How to install redis server on CentOS 7 / RHEL 7 October 4, 2014 by sharad chhetri Leave a Comment In this tutorial we will learn, how to install redis server on CentOS 7 / RHEL 7 . The abbreviation of redis is REmote DIctionary Server. It is one the

在CentOS 7 / RHEL 7配置OpenLDAP服务

OpenLDAP是OpenLDAP项目开发的轻量级目录访问协议的开源实现.LDAP是一种Internet协议,电子邮件和其他程序用于从服务器查找联系人信息.它是在OpenLDAP公共许可下发布的; 它适用于所有主要的Linux发行版, AIX, Android, HP-UX, OS X, Solaris, Windows和z/OS. 它以某种方式用作关系数据库,可用于存储任何信息.LDAP不限于存储信息; 它还用作"单点登录"的后端数据库,其中用户的一个密码在许多服务之间共享. 在本教

CentOS或RHEL使用安装光盘镜像制作本地yum源

平时自己在家学习的时候,有时候会用到一些虚拟机环境.最初安装的时候为了节省本地的磁盘空间,选择最小安装模式,后期使用的时候,如果用到什么其他的软件包,再去另外安装.但是使用网络上的yum源,可能会因为种种原因,不能访问,或者速度收到限制,影响效率,因此我们可以使用安装OS时使用的光盘镜像,来搭建一个本地yum源. 方法如下: 1. 在虚拟机设置中,挂载光盘镜像文件: 2. 使用下面的方法配置: # mount /dev/cdrom /mnt # cd /etc/yum.repos.d/ # ta

Configure VNC Server on CentOS 7 / RHEL 7

The following simple guide help you to setup the VNC server on RHEL 7/CentOS 7 machines, VNC help to share the desktop with the other machines which has a client installed. VNC server and client are not installed by default, you need to setup the vnc

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

今天在CentOS机(centos最小化安装的系统)上搭建了一个web服务,在访问这个web服务的时候显示超时,竟然没有连接上.明明在本机上使用curl命令显示了nginx的初始输出信息,但是远程访问为什么就不可以呢?首先ping了web服务器的机子,能ping通,这下有点懵比了. 在网上查了下原来是防火墙惹的祸,没有开启80端口. 于是按照网上的说法安装了需要运行setup命令调用图形界面修改,运行setup命令时,却显示无法找到这个命令,看来是缺少setuptool包,安装完后运行setup

CentOS(RHEL)内核版本与系统版本对应关系

通过本文你可以获取如下信息: CentOS/RHEL 内核源码包下载地址. CentOS/RHEL 内核版本和系统版本对应关系. CentOS/RHEL 各个系统版本发布时间. CenOS 各个版本源码包及RPM包下载地址. 以下信息全部来自官方:http://vault.centos.org/ Name Last modified Size Description 对应内核源码包 5.0/ 11-Apr-2007 18:53 - kernel-2.6.18-8.el5.src.rpm 5.1/