Ubuntu – Change keyboard layout (English UK) on command line to English US

command linekeyboard-layout

I am using Ubuntu 12.04. The keyboard layout is English US everywhere except for the Command Line where it works in English UK. Terminal also has English US. How do I change the default keyboard layout in Command Line to English US?

Also, I think it might be worth noting here, that when I had installed Ubuntu (dual boot with Windows 8. 1), I had initially set the language as English UK, but later changed it to English US from the system settings.

Best Answer

Update 2017-04-13: This seems to have changed in recent Ubuntu versions and running sudo apt-get install console-common will try to remove other packages. So, for recent Ubuntu versions, use this instead (Tested in 17.04):

sudo dpkg-reconfigure keyboard-configuration

The simplest way would indeed be as @steeldriver suggested to open a terminal and run this command:

sudo apt-get install console-common

That will install the console-common package and in the process allow you to chose your console layout. If that is already installed, use this to bring up the same wizard and set the layout:

sudo dpkg-reconfigure console-data

Tested on 13.10, and taken from here.

Related Question