How to change keyboard layout on Raspberry Pi

In this tutorial, you will see how to change the keyboard layout on your Raspberry Pi. This will allow you to access all of the necessary characters available in the language of your desire, as well as give you an opportunity to switch between a QWERTY or other type of keyboard layout. We will assume that you are using the official Raspberry Pi OS, from which the keyboard layout can be configured via both command line and GUI.

In this tutorial you will learn:

  • How to change the keyboard layout on Raspberry Pi via command line
  • How to change the keyboard layout on Raspberry Pi via desktop GUI
How to change keyboard layout on Raspberry Pi
How to change keyboard layout on Raspberry Pi
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Raspberry Pi
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to change keyboard layout on Raspberry Pi step by step instructions




We will cover two methods below, both command line and GUI. Feel free to choose whichever method is the easiest for you.

Change Keyboard Layout via Command Line

  1. Start by opening a command line terminal and typing the following command to open the raspi-config utility with root permissions:
    $ sudo raspi-config
    
  2. Next, open the ‘Localisation Options’ menu.
    Opening the Localisation Options menu from the raspi-config utility
    Opening the Localisation Options menu from the raspi-config utility
  3. Next, open the ‘Keyboard’ menu.
    Opening the keyboard menu inside raspi-config
    Opening the keyboard menu inside raspi-config
  4. Here you can select the keyboard layout. Note that this is not the language selection (we will do that next). For the majority of keyboards, you will want to select the Generic 105-key PC option.
    Selecting the keyboard layout
    Selecting the keyboard layout
  5. Next, select the language that you want to use for your keyboard. If something other than English, you may have to scroll down to the bottom and select ‘Other.’



    Browsing for a language to select for our keyboard layout
    Browsing for a language to select for our keyboard layout

  6. Finally, choose the language that corresponds to your keyboard.
    Choosing a keyboard language
    Choosing a keyboard language
  7. Choose additional options for the AltGr key, or just accept your keyboard’s default settings:
    Choosing a setting for the AltGr key
    Choosing a setting for the AltGr key
  8. Do the same thing for the Compose key:
    Choosing a setting for the Compose key
    Choosing a setting for the Compose key
  9. Choose what you want the Ctrl + Alt + Backspace behavior to do:
    Choose a setting to terminate the X server or not
    Choose a setting to terminate the X server or not

Change Keyboard Layout via Desktop GUI

  1. Start by opening the application launcher, then navigating to Preferences > Keyboard and Mouse.
    Opening the keyboard and mouse menu
    Opening the keyboard and mouse menu
  2. Under the Keyboard tab, click on the Keyboard Layout button.



    Locate the keyboard layout button
    Locate the keyboard layout button

  3. In this menu, select your keyboard model, the language, and the variant (or dialect) to use. Then, click OK.
    Choosing the keyboard layout from the GUI menu
    Choosing the keyboard layout from the GUI menu

Closing Thoughts

In this tutorial, we saw how to change the keyboard layout on a Raspberry Pi system. We can change our keyboard layout at any time via both command line and GUI, in case we switch keyboards to a different type of layout or language.



Comments and Discussions
Linux Forum