November 12, 2025

Commands I used to set up muliple keyboard layouts and switch between them

My actual keyboard configuration is there:

/etc/defaults/keyboard

To display the actual configuration run:

$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     ca, de, ir
variant:    multix, qwerty
options:    ctrl:nocaps,grp:alt_shift_toggle

or:

$ localectl status
   System Locale: LANG=en_CA.UTF-8
          LANGUAGE=en_CA:en
       VC Keymap: n/a
      X11 Layout: ca, de, ir
       X11 Model: pc105
     X11 Variant: multix, qwerty
     X11 Options: ctrl:nocaps,grp:alt_shift_toggle

Read about /etc/defaults/keyboard in:

$ man keyboard

Read about setxkbmap in:

$ man setxkbmap

To display the layouts and variants available run:

$ man xkeyboard-config

To switch to farsi:

$ setxkbmap ir

Switch to german:

$ setxkbmap de

And to switch to Canadian csa:

$ setxkbmap ca -variant multi

List all layout available:

$ localectl list-x11-keymap-layouts

List all variant available for a given layout, for example for de:

$ localectl list-x11-keymap-variants de

List all available switching options:

$ localectl list-x11-keymap-options | grep grp: 

Get a graphical interface to customise key mapping:

$ sudo apt install xkeycaps 

My config as of now:

$ cat /etc/defaults/keyboard
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="ca, de, ir"
XKBVARIANT="multix, qwerty, pes_keypad"
XKBOPTIONS=ctrl:nocaps,grp:alt_shift_toggle

BACKSPACE="guess"

personal computing command-line interface (cli) gnu linux trisquel shell literacy wiki

No affiliate links, no analytics, no tracking, no cookies. This work © 2016-2025 by yctct is licensed under CC BY-SA 4.0 .   about me   contact me   all entries & tags   FAQ   GPG public key

GPG fingerprint: 2E0F FB60 7FEF 11D0 FB45 4DDC E979 E52A 7036 7A88