top image
home  /  pages  /  tech tips  /  contact about

How to override the default keyboard layout in Linux


When you plug in a USB keyboard into a Linux machine it has the wrong layout. For example, you want it to be Dvorak but it's Qwerty. This starts to be very annoying when you use a KVM to switch between computers. Sadly, gnome keyboard properties and the layout switcher get very confused by all this and make things worse rather than better.


USB, keyboard, layout, qwerty, dvorak, gnome, console, xkb.


Edit /etc/default/console-setup and set XKBLAYOUT to what you want it to be, e.g., "dvorak". If, like me, you want to swap the Escape and the CapsLock key, set XKBOPTIONS to 'caps:swapescape'.
Copyright © 1994-2011 by Thomer M. Gil
Updated: 2009/07/08