Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to change layout of keyboard while working in console in Linux. I need to setup English layout as default for console. How to do it?

share|improve this question
What distro are you using? – emzero Mar 24 '12 at 23:31
Ubuntu, logged under root – RCola Mar 24 '12 at 23:37
"loadkeys us" worked! How to make it default layout? – RCola Mar 24 '12 at 23:42

4 Answers 4

up vote 13 down vote accepted

To change the system-wide keyboard layout, run

sudo dpkg-reconfigure keyboard-configuration

or edit the XKBLAYOUT line in /etc/default/keyboard.

share|improve this answer

To change your keyboard layout fast, just install setxkbmap with:

sudo apt-get install x11-xkb-utils

After this you can always change the keyboard layout with:

setxkbmap us

To do this automatically every time, extend your .bashrc with:

echo "setxkbmap us" >> ~/.bashrc

Now, open a new console and the US keyboard layout is activated. Don't worry if the small keyboard layout icon in the Ubuntu panel does not change.

share|improve this answer

Put it in /etc/profile.d/bashrc

share|improve this answer
Bhaskar Karambelkar does probably meant «Put loadkeys us to .bashrc». I am hardly didn't set «-1» but figured out it from comments. – Hi-Angel Aug 24 '14 at 19:38

another way, but I understand it wont last for next boot:

sudo loadkeys /usr/share/keymaps/i386/qwerty/us.kmap.gz

check /usr/share/keymaps/i386/ for you keyboard layout and keymaps to what suits you better

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.