Ubuntu – How to change keyboards from the command line


How I change keyboard layouts from the command-line? For example, I want to switch from English to Hebrew. I'm able to do it from lightdm with the little icon in the corner of my screen.

Best Answer

From terminal

English to Hebrew and vise versa with Alt + Shift

setxkbmap -option grp:alt_shift_toggle us,il

You can see all locale alias with this command

cat /etc/locale.alias

More info about setxkbmap in manual

man setxkbmap
Related Question