18

Change keyboard layout in CentOS in console

Posted September 3rd, 2011 in Snippets by Metod

Quick tip. How to change keyboard layout in CentOS in console?

# vi /etc/sysconfig/keyboard

and change the KEYTABLE key. All available options can be found in subdirectories under /lib/kbd/keymaps/i386.

After that, just restart the machine.

# shutdown -r now

18 Responses so far.

  1. Спасибо за блог, очень интересный подход, подписался на ваш блог, буду заходить чаще.

  2. Lopexxx says:

    Simple and accurate, just what I needed. Thank you!

  3. Paolo says:

    Thank you for this quick tip.
    I have a spanish keyboard and I was going crazy trying to configure FreePBX

  4. Rodrigo says:

    Thank you very much! It works like a charm.

    For brazilian keyboards (abnt2), one can try:

    KEYTABLE=”br-abnt2″
    MODEL=”abnt2″
    LAYOUT=”br”
    KEYBOARDTYPE=”pc”

    For american ones using brazilian accentuation:

    KEYTABLE=”br-latin1-us”
    MODEL=”latin1-us”
    LAYOUT=”br”
    KEYBOARDTYPE=”pc”

    Bests from Brazil!

  5. Cosmin says:

    Please can help me? language Italy

    Thanks you

  6. Roberto Silva says:

    Cosmin,

    You can use:

    KEYTABLE=”it”
    MODEL=”pc105”
    LAYOUT=”it”
    KEYBOARDTYPE=”pc”

    Regards,
    Roberto Silva

  7. Ruda says:

    Czech

    You can use:

    KEYTABLE=”cz”
    MODEL=”pc105+inet”
    LAYOUT=”cz”
    KEYBOARDTYPE=”pc”

  8. Michael says:

    Belgium/België

    KEYTABLE=”be-latin1”

  9. Leandro says:

    It seems applications are not using the same keyboard mappings!
    I’m using an american keyboard and writing in portuguese. I updated /etc/sysconfig/keyboard with the values provided by Rodrigo then restarted.
    It’s working only in the console. Firefox and Sublime Text2 shows “‘”+ “c” (“ç”) as “ć”, gedit shows nothing.
    In Firefox and Sublime Text2 the only problem is “ç”, gedit is quite different, it seems like a Brazilian ABNT2 keyboard.

    Thanks!

    locale
    LANG=pt_BR.UTF-8
    LC_CTYPE=”pt_BR.UTF-8″
    LC_NUMERIC=”pt_BR.UTF-8″
    LC_TIME=”pt_BR.UTF-8″
    LC_COLLATE=”pt_BR.UTF-8″
    LC_MONETARY=”pt_BR.UTF-8″
    LC_MESSAGES=”pt_BR.UTF-8″
    LC_PAPER=”pt_BR.UTF-8″
    LC_NAME=”pt_BR.UTF-8″
    LC_ADDRESS=”pt_BR.UTF-8″
    LC_TELEPHONE=”pt_BR.UTF-8″
    LC_MEASUREMENT=”pt_BR.UTF-8″
    LC_IDENTIFICATION=”pt_BR.UTF-8″
    LC_ALL=

    /etc/sysconfig/keyboard
    KEYTABLE=”br-latin1-us”
    MODEL=”latin1-us”
    LAYOUT=”br”
    KEYBOARDTYPE=”pc”

  10. dimitri says:

    Does /etc/sysconfig/keyboard changes have no effect in Centos 7, what’s going on ?

  11. […] an american keyboard and writing in Portuguese. I updated /etc/sysconfig/keyboard as the following article suggested. It worked but only in the console. Firefox and Sublime Text2 shows ‘+c (ç) as ć, […]

  12. TitanSmash says:

    And Swiss keyboardlayout?

    Plz

    • Sebastian says:

      For Swiss German you can use following:

      KEYTABLE=”de_CH-latin1″
      MODEL=”pc105+inet”
      LAYOUT=”de_CH”
      KEYBOARDTYPE=”pc”