Linux - How to permanently configure keyboard
Using the command sudo dpkg-reconfigure keyboard-configuration
will change your keyboard layout just for this session.
Go for sudo vi /etc/default/keyboard there you can change your keyboard settings.
Find the line:
XKBLAYOUT="xx"
You can change layout and kboptions as well as your model and the kbvariant.

Just put in it for Italian Keyboard File on older ubuntu versions you could go for dpkg-reconfigure console-setup and make permanently changes here.
Commenti