How to Change Keyboard Layout on Ubuntu 22.04

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.

Ubuntu Activities menu showing the Settings option

Step 2. Open the the keyboard tab. In the Input Sources section, click on the + icon to add a new keyboard layout.

Click the plus sign to expand all language options

Step 3. Click on the three dots at the bottom of the “Add an Input Source” prompt.

Expanding the choices inside the Add an Input Source menu

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.

Search for the language you wish to add

Step 5. And that’s it. Now you can switch keyboard layouts using Super + Space.

Switching langauge using keyboard shortcut

Or by clicking on the language icon in the upper right corner of GNOME desktop.

Switching keyboard layout using upper right corner

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.

Selecting keyboard model via terminal

Use your arrow keys to highlight your desired selection. Then, press Tab to move your cursor down to “Ok” then hit Enter to proceed.

Step 3. Next, you need to select what language your keyboard is in.

Choosing keyboard layout language in terminal

Step 4. Then, select the keyboard layout.

Selecting keyboard layout via terminal

Step 5. Next, you can choose how to configure your keyboard’s AltGr key. If in doubt, use the default.

Configuring the AltGr key in command line

Step 6. Next, you can choose how to configure your keyboard’s Compose key. If in doubt, use the default.

Configuring the Compose key in command line

Step 7. Lastly, select whether or not you want to configure the Ctrl+Alt+Backspace shortcut (you probably don’t).

Optionally configuring the last shortcut

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) ...

Leave a Comment

Your email address will not be published. Required fields are marked *