语言时间基础配置


1. 设置语言环境:

  • 显示当前语言环境状态 显示当前语言环境
    $ localectl status
       System Locale: LANG=zh_CN.UTF-8                                                                                                                                                                                          VC Keymap: cn                                                                                                                                                                               
          X11 Layout: cn                                                                                                                                                                                                        X11 Model: pc10
    
  • 列出可用的语言环境:
    $ localectl list-locales
    C.UTF-8
    aa_DJ
    aa_DJ.utf8
    aa_ER
    aa_ER@saaho
    aa_ET
    af_ZA
    af_ZA.utf8
    ...
    
  • 列出可用的中文环境:
    $ localectl list-locales | grep zh
    lzh_TW
    zh_CN
    zh_CN.gb18030
    zh_CN.gbk
    zh_CN.utf8
    zh_HK
    zh_HK.utf8
    zh_SG
    zh_SG.gbk
    zh_SG.utf8
    zh_TW
    zh_TW.euctw
    zh_TW.utf8
    
  • 设置中文中文环境:
    $ localectl set-locale LANG=zh_CN.utf8
    

2. 显示时间和日期:

  • 使用timedatectl命令设置:
    $ timedatectl
                 Local time: 三 2021-06-30 11:04:18 CST
             Universal time: 三 2021-06-30 03:04:18 UTC
                   RTC time: 三 2021-06-30 03:04:18
                  Time zone: Asia/Shanghai (CST, +0800)
    System clock synchronized: yes
                NTP service: inactive
            RTC in local TZ: no
    
©龙芯开源社区 all right reserved,powered by Gitbook文档更新时间: 2023-12-21 12:36:52

results matching ""

    No results matching ""

    results matching ""

      No results matching ""