How to reconfigure keyboard on a Debian based distro

When the keyboard on a Debian based distro isn't properly configured, the configuration can be altered by using the following command:


sudo dpkg-reconfigure keyboard-configuration

dpkg-reconfigure needs to be executed as root.

Restart the system after saving the new configuration.


sudo reboot