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?
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
sudo dpkg-reconfigure console-data, I found out that it doesn't work after a reboot.
sudo dpkg-reconfigure keyboard-configuration
does work after reboot and also has more options.