「Linux」- 本地语言设置

CentOS 7

使用localectl命令:

# localectl status

# localectl list-locales

# localectl set-locale LANG=<locale_name>

# localectl –help

更多的内容可以参考手册localectl(1)手册。

CentOS 6.X

通过配置文件修改:

  • /etc/sysconfig/i18n # 系统级配置文件
  • $HOME/.i18n # 用户级别配置文件
  • /etc/profile # 定义LANG=变量即可

这并不需要重启,用户重新登录即可。

参考文献

How to Set Up System Locale on CentOS 7
How to Change the System locale in CentOS / RHEL 5,6