Modify the keyboard layout
Use the dpkg-reconfigure tool to change the keyboard layout, with the commands below:
$ sudo apt-get install keyboard-configuration console-setup
$ sudo dpkg-reconfigure keyboard-configuration
$ sudo systemctl restart keyboard-setup