Sunday, May 05, 2013

Change keyboard layout in Ubuntu 12.04 from command prompt

Instead of installing Ubuntu 12.04 from scratch, i decided to download a prepacked virtual box template from http://virtualboxes.org/images. Unfortunately, the keyboard configuration did not match my Lenovo T430, causing all sorts of havoc. Plus, i did not have x-windows installed so the mouse was useless as well.

To change the keyboard configuration from the command prompt, use the following syntax:
sudo dpkg-reconfigure keyboard-configuration 
  This will let you configure your keyboard settings, and also persist the changes after a reboot.