In Ubuntu 20.04, how can I change the keyboard layout in the terminal, and without using superuser permissions?

Edit: I do not have a graphical interface, and therefore no access to e.g. setxkbmap.


The available layouts are listed in man xkeyboard-config. Choose one.

In a graphical (X11) session

setxkbmap -layout "<chosen-layout>"

Don't forget the quotes if the layout contains parenthesis.

In a virtual console (text-only, TTY) session

Impossible without having root access, unless the sysadmin agrees to let users execute loadkeys, as described in Loadkeys gives permission denied for normal user, in which case you could use

loadkeys < <(ckbcomp -layout '<chosen-layout>')
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.