In this tutorial, you will learn how to change the keyboard layout on Ubuntu 22.04 from GUI and command line. This is handy for users that wish to type in multiple languages.
Change Keyboard Language via GUI
Step 1. Open Settings from Ubuntu’s Activities menu.
Step 2. Open the the keyboard tab. In the Input Sources section, click on the +
icon to add a new keyboard layout.
Step 3. Click on the three dots at the bottom of the “Add an Input Source” prompt.
Step 4. Click on “Other” at the bottom see all the languages you can choose. Or just use the search box and type the language you want. In this example, we are adding a Spanish keyboard.
Step 5. And that’s it. Now you can switch keyboard layouts using Super + Space.
Or by clicking on the language icon in the upper right corner of GNOME desktop.
Change Keyboard Layout via Command Line
Step 1. To change your keyboard layout and language in terminal, type:
$ sudo dpkg-reconfigure keyboard-configuration
Step 2. First, you will be prompted to select your keyboard model. If in doubt, use the default.
Step 3. Next, you need to select what language your keyboard is in.
Step 4. Then, select the keyboard layout.
Step 5. Next, you can choose how to configure your keyboard’s AltGr key. If in doubt, use the default.
Step 6. Next, you can choose how to configure your keyboard’s Compose key. If in doubt, use the default.
Step 7. Lastly, select whether or not you want to configure the Ctrl+Alt+Backspace shortcut (you probably don’t).
Step 8. You’ll receive output similar to the following in terminal to confirm that your keyboard configuration has been applied:
Your console font configuration will be updated the next time your system boots. If you want to update it now, run 'setupcon' from a virtual console. update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.140ubuntu13) ...