Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Im setting up some Chef scripts to build and configure a Ubuntu 11.04 instance for development.

I'm having some trouble finding away of reconfiguring the keyboard with no user interaction.

I tried using setxkbmap gb but this resets as soon as you reboot the vm and not all programs seem to honour this setting.

Can someone please point me to the correct file or command to change the keyboard layout and persist it over sessions and programs.

share|improve this question

I tried to edit the files but it doesn't help, but simply executing the command below helped:

sudo loadkeys gb 
share|improve this answer

Try /etc/default/console-setup

This should be loaded from the console-setup scripts in your initrd. See /usr/share/initramfs-tools/scripts/init-top/console_setup for an idea of what they do.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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