Changing TTY keyboard layout on a server?

I use 12.04 Server in command line mode (no X installed), and I would like to change the keyboard layout. How can I do this?


After trying sudo dpkg-reconfigure console-data, I found out that it doesn't work after a reboot.

However,

sudo dpkg-reconfigure keyboard-configuration

does work after reboot and also has more options.

More info here.


Please try the following command:

sudo dpkg-reconfigure console-data

If it says you don't have the package, then install console-data with:

sudo apt-get install console-data

More about Locale Configuration: LocaleConf - Community Help Wiki


Try:

loadkeys es (Spanish)
loadkeys pt (Portuguese)
loadkeys br (Brazilian Portuguese)
loadkeys ch (Swiss German)