Change Linux console keyboard mapping
Change Linux CentOS console keyboard layout
If you’re working in a virtual server and want to change your Linux CentOS console keyboard layout to match the one you are used to, you can do so by using the command localectl
command. This command will change the layout to match your preferred keyboard layout.
To see a full list of possible keymaps, you can also use the command localectl
command. This will give you a list of keymaps to choose from, including options for different languages and variations of keyboard layouts. Let’s see how.
Set the keyboard layout
For example, if you wanted to change the keyboard layout to match that of a Swiss French keyboard, you would use the following command:
localectl set-keymap ch
List all keyboard layout options
By using these commands, you can easily change the keyboard layout on your virtual appliance to better suit your needs and improve your productivity. You can list all options with the following command:
localectl list-keymaps
That’s it really.
Worth noting
It’s important to note that the above commands can be used on any Linux machine, not just virtual appliances running CentOS. The localectl command is a useful tool for any Linux user to change their keyboard layout as needed.
Additionally, it’s also possible to change the keyboard layout permanently. This can be done by editing the /etc/vconsole.conf
file and adding the following line: KEYMAP=ch (or any other keymap of your choice).
Another way to change the keyboard layout permanently is to use the loadkeys command. For example, to load a Swiss French keyboard layout, you would use the command: loadkeys ch. This command can also be added to your startup script so that the layout is automatically loaded every time you boot your machine.
It’s also worth noting that it is possible to change the layout of the keyboard not only for console but also for graphical interfaces. For this, you can use the command setxkbmap or the graphical settings of your desktop environment.
Conclusion
In conclusion, changing the keyboard layout on your Linux machine is a simple process. Whether you’re working on a virtual appliance or a local machine, using the localectl command or editing configuration files, you can easily change the layout to better suit your needs and improve your productivity. It’s always good to have the knowledge of how to adjust settings to optimize your workflow.
Full list of possible keymaps
ANSI-dvorak al al-plisi amiga-de amiga-us applkey at at-mac at-nodeadkeys at-sundeadkeys atari-de atari-se atari-uk-falcon atari-us az azerty ba ba-alternatequotes ba-unicode ba-unicodeus ba-us backspace bashkir be be-iso-alternate be-latin1 be-nodeadkeys be-oss be-oss_latin9 be-oss_sundeadkeys be-sundeadkeys be-wang bg-cp1251 bg-cp855 bg_bds-cp1251 bg_bds-utf8 bg_pho-cp1251 bg_pho-utf8 br br-abnt br-abnt2 br-dvorak br-latin1-abnt2 br-latin1-us br-nativo br-nativo-epo br-nativo-us br-nodeadkeys br-thinkpad by by-cp1251 by-latin bywin-cp1251 ca ca-eng ca-fr-dvorak ca-fr-legacy ca-multi ca-multix carpalx carpalx-full cf ch ch-de_mac ch-de_nodeadkeys ch-de_sundeadkeys ch-fr ch-fr_mac ch-fr_nodeadkeys ch-fr_sundeadkeys ch-legacy cm cm-azerty cm-dvorak cm-french cm-mmuock cm-qwerty cn cn-altgr-pinyin croat ctrl cz cz-bksl cz-cp1250 cz-dvorak-ucw cz-lat2 cz-lat2-prog cz-qwerty cz-qwerty-mac cz-qwerty_bksl cz-rus cz-us-qwertz de de-T3 de-deadacute de-deadgraveacute de-deadtilde de-dsb de-dsb_qwertz de-dvorak de-latin1 de-latin1-nodeadkeys de-mac de-mac_nodeadkeys de-mobii de-neo de-nodeadkeys de-qwerty de-ro de-ro_nodeadkeys de-sundeadkeys de-tr de_CH-latin1 de_alt_UTF-8 defkeymap defkeymap_V1.0 dk dk-dvorak dk-latin1 dk-mac dk-mac_nodeadkeys dk-nodeadkeys dk-winkeys dvorak dvorak-ca-fr dvorak-es dvorak-fr dvorak-l dvorak-la dvorak-programmer dvorak-r dvorak-ru dvorak-sv-a1 dvorak-sv-a5 dvorak-uk dz ee ee-dvorak ee-nodeadkeys ee-us emacs emacs2 en-latin9 epo epo-legacy es es-ast es-cat es-cp850 es-deadtilde es-dvorak es-mac es-nodeadkeys es-olpc es-sundeadkeys es-winkeys et et-nodeadkeys euro euro1 euro2 fi fi-classic fi-kotoistus fi-mac fi-nodeadkeys fi-smi fi-winkeys fo fo-nodeadkeys fr fr-afnor fr-azerty fr-bepo fr-bepo-latin9 fr-bepo_afnor fr-bepo_latin9 fr-bre fr-dvorak fr-latin0 fr-latin1 fr-latin9 fr-latin9_nodeadkeys fr-latin9_sundeadkeys fr-mac fr-nodeadkeys fr-oci fr-old fr-oss fr-oss_latin9 fr-oss_nodeadkeys fr-oss_sundeadkeys fr-pc fr-sundeadkeys fr-us fr_CH fr_CH-latin1 gb gb-colemak gb-dvorak gb-dvorakukp gb-extd gb-intl gb-mac gb-mac_intl gb-pl ge ge-ergonomic ge-mess ge-ru gh gh-akan gh-avn gh-ewe gh-fula gh-ga gh-generic gh-gillbt gh-hausa gr gr-pc hr hr-alternatequotes hr-unicode hr-unicodeus hr-us hu hu-101_qwerty_comma_dead hu-101_qwerty_comma_nodead hu-101_qwerty_dot_dead hu-101_qwerty_dot_nodead hu-101_qwertz_comma_dead hu-101_qwertz_comma_nodead hu-101_qwertz_dot_dead hu-101_qwertz_dot_nodead hu-102_qwerty_comma_dead hu-102_qwerty_comma_nodead hu-102_qwerty_dot_dead hu-102_qwerty_dot_nodead hu-102_qwertz_comma_dead hu-102_qwertz_comma_nodead hu-102_qwertz_dot_dead hu-102_qwertz_dot_nodead hu-nodeadkeys hu-qwerty hu-standard hu101 ie ie-CloGaelach ie-UnicodeExpert ie-ogam_is434 il il-heb il-phonetic in-eng iq-ku iq-ku_alt iq-ku_ara iq-ku_f ir-ku ir-ku_alt ir-ku_ara ir-ku_f is is-Sundeadkeys is-dvorak is-latin1 is-latin1-us is-mac is-mac_legacy is-nodeadkeys it it-fur it-geo it-ibm it-intl it-mac it-nodeadkeys it-scn it-us it-winkeys it2 jp jp-OADG109A jp-dvorak jp-kana86 jp106 kazakh ke ke-kik keypad kr kr-kr104 ky_alt_sh-UTF-8 kyrgyz kz-latin la-latin1 latam latam-colemak latam-colemak-gaming latam-deadtilde latam-dvorak latam-nodeadkeys latam-sundeadkeys lk-us lt lt-ibm lt-lekp lt-lekpa lt-std lt-us lt.baltic lt.l4 lv lv-adapted lv-apostrophe lv-ergonomic lv-fkey lv-modern lv-tilde ma-french mac-be mac-de-latin1 mac-de-latin1-nodeadkeys mac-de_CH mac-dk-latin1 mac-dvorak mac-es mac-euro mac-euro2 mac-fi-latin1 mac-fr mac-fr_CH-latin1 mac-it mac-pl mac-pt-latin1 mac-se mac-template mac-uk mac-us md md-gag me me-latinalternatequotes me-latinunicode me-latinunicodeyz me-latinyz mk mk-cp1251 mk-utf mk0 ml ml-fr-oss ml-us-intl ml-us-mac mm mt mt-alt-gb mt-alt-us mt-us ng ng-hausa ng-igbo ng-yoruba nl nl-mac nl-std nl-sundeadkeys nl2 no no-colemak no-dvorak no-latin1 no-mac no-mac_nodeadkeys no-nodeadkeys no-smi no-smi_nodeadkeys no-winkeys pc110 ph ph-capewell-dvorak ph-capewell-qwerf2k6 ph-colemak ph-dvorak pl pl-csb pl-dvorak pl-dvorak_altquotes pl-dvorak_quotes pl-dvp pl-legacy pl-qwertz pl-szl pl1 pl2 pl3 pl4 pt pt-latin1 pt-latin9 pt-mac pt-mac_nodeadkeys pt-mac_sundeadkeys pt-nativo pt-nativo-epo pt-nativo-us pt-nodeadkeys pt-olpc pt-sundeadkeys ro ro-cedilla ro-std ro-std_cedilla ro-winkeys ro_std rs-latin rs-latinalternatequotes rs-latinunicode rs-latinunicodeyz rs-latinyz ru ru-cp1251 ru-cv_latin ru-ms ru-yawerty ru1 ru2 ru3 ru4 ru_win 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 se se-dvorak se-fi-ir209 se-fi-lat6 se-ir209 se-lat6 se-latin1 se-mac se-nodeadkeys se-smi se-svdvorak se-us se-us_dvorak sg sg-latin1 sg-latin1-lk450 si si-alternatequotes si-us sk sk-bksl sk-prog-qwerty sk-prog-qwertz sk-qwerty sk-qwerty_bksl sk-qwertz slovene sr-cy sun-pl sun-pl-altgraph sundvorak sunkeymap sunt4-es sunt4-fi-latin1 sunt4-no-latin1 sunt5-cz-us sunt5-de-latin1 sunt5-es sunt5-fi-latin1 sunt5-fr-latin1 sunt5-ru sunt5-uk sunt5-us-cz sunt6-uk sv-latin1 sy-ku sy-ku_alt sy-ku_f tj_alt-UTF8 tm tm-alt tr tr-alt tr-crh tr-crh_alt tr-crh_f tr-f tr-intl tr-ku tr-ku_alt tr-ku_f tr-sundeadkeys tr_f-latin5 tr_q-latin5 tralt trf trf-fgGIod trq ttwin_alt-UTF-8 ttwin_cplk-UTF-8 ttwin_ct_sh-UTF-8 ttwin_ctrl-UTF-8 tw tw-indigenous tw-saisiyat ua ua-cp1251 ua-utf ua-utf-ws ua-ws uk unicode us us-acentos us-alt-intl us-altgr-intl us-colemak us-dvorak us-dvorak-alt-intl us-dvorak-classic us-dvorak-intl us-dvorak-l us-dvorak-r us-dvp us-euro us-hbs us-intl us-mac us-norman us-olpc2 us-workman us-workman-intl uz-latin vn vn-fr vn-us wangbe wangbe2 windowkeys
You can find more details about the localectl
command here.