Centos7 locale区域语言设置

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lemontree1945/article/details/80088986

1.Language Codes Reference

Language$LANG value
Englist(US)en_US.utf8
Assameseas_IN.utf8
Bengalibn_IN.utf8
Chinese(Simplified)zh_CN.utf8
chinese(Traditional)zh_TW.utf8
Frenchfr_FR.utf8
Germande_DE.utf8
Gujaratigu_IN.utf8
Hindihi_IN.utf8
Italianit_IT.utf8
Japaneseja_JP.utf8
Kannadakn_IN.utf8
Koreanko_KR.utf8
Malayalamml_IN.utf8
Marathimr_IN.utf8
Odiaor_IN.utf8
Portuguese(Brazilian)pt_BR.utf8
Punjabipa_IN.utf8
Russianru_RU.utf8
Spanishes_ES.utf8
Tamil

ta_IN.utf8

Telugute_IN.utf8

2.查看系统默认的语言设置

[root@room9pc01 ~]# locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"

LC_ALL=

3.查看当前区域配置

[root@room9pc01 ~]# localectl status
   System Locale: LANG=zh_CN.utf8
       VC Keymap: cn

      X11 Layout: cn

4.查看系统支持的汉语区域语言

[root@room9pc01 ~]# localectl list-locales| grep zh 
    zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8
zh_HK
zh_HK.big5hkscs
zh_HK.utf8
zh_SG
zh_SG.gb2312
zh_SG.gbk
zh_SG.utf8
zh_TW
zh_TW.big5
zh_TW.euctw
zh_TW.utf8

5.设置区域语言

    [root@room9pc01 ~]# localectl set-locale  LANG=zh_CN.utf8

6.查看对应的配置文件

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

    LANG=zh_CN.utf8 

7.刷新bash 或者重启,使设置生效

    

展开阅读全文

没有更多推荐了,返回首页