Change localization on CentOS 7

We look at the current language:

[[email protected]]# localectl
System Locale: n/a
    VC Keymap: n/a
   X11 Layout: n/a

See if Russian is available:

[[email protected]]# localectl list-locales | grep ru
ru_RU
ru_RU.iso88595
ru_RU.koi8r
ru_RU.utf8
ru_UA
ru_UA.koi8u
ru_UA.utf8
russian

Set the encoding to UTF-8 in the CentOS 7 console and select English as the system language

[[email protected]]# localectl set-locale LANG=en_US.UTF-8

We reboot the server, check the settings.

[[email protected]]# reboot
[[email protected]]# localectl status
System Locale: LANG=en_US.UTF-8
    VC Keymap: us
   X11 Layout: us,ru
  X11 Variant: ,
  X11 Options: grp:alt_shift_toggle

Set Russian as the system language

[[email protected]]# localectl set-locale LANG=ru_RU.UTF-8

View available Russian keyboard layouts:

[[email protected]]# localectl list-keymaps | grep ru
ruwin_alt-CP1251
ruwin_alt-KOI8-R
ruwin_alt-UTF-8
ruwin_alt_sh-UTF-8
ruwin_cplk-CP1251
ruwin_cplk-KOI8-R
ruwin_cplk-UTF-8
ruwin_ct_sh-CP1251
ruwin_ct_sh-KOI8-R
ruwin_ct_sh-UTF-8
ruwin_ctrl-CP1251
ruwin_ctrl-KOI8-R
ruwin_ctrl-UTF-8

Set Russian layout with ALT + SHIFT switching:

[[email protected]]# localectl set-keymap ruwin_alt_sh-UTF-8

After applying, you need to restart the server.

[[email protected]]# reboot
Sidebar