Change keyboard to Spanish distribution on Ubuntu Server

Published at 08 Jan 2025

To change the keyboard distribution to Spanish on an Ubuntu Server, we must execute the following command.

sudo dpkg-reconfigure keyboard-configuration

This command will open a wizard with multiple steps, first we should select the keyboard model, generally you will select Generic 105-key PC.

Next, we should select the country distribution, in our case Spanish.

Now we should select which key will be AltGr, usually Right Alt (AltGr).

Last, we should select which key will be the Compose Key, usually No compose key.

Once we're finished the wizard it will reconfigure the system in order to start using the new keyboard distribution.

It's recommended to restart the computer to apply the changes.

sudo reboot