How to Change your Keyboard Layout on Raspberry Pi? (Raspbian)


If like me you don’t use a QWERTY keyboard, the first thing you are probably looking for on your Raspberry Pi is how to change the default layout
So let’s do this!

How to change your keyboard layout on Raspberry Pi?
On Raspbian, the default keyboard layout is QWERTY
You can change it in the system settings
On Desktop, go to Preferences > Raspberry Pi Configuration
And on the Lite version, you can use raspi-config to change it

Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I'm here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.

After this short answer, I will now give you all the detailed steps in the following paragraphs
I’ll firstly show you how to do this on Raspbian Desktop, and then on Raspbian Lite

By the way, if you don’t have a budget to afford a course for now (if you just got your Raspberry Pi stuff, I completely understand), you can join Skillshare for a free 14-day trial. It includes courses from the best teachers in many categories, including IT (Linux, programming, …) and Raspberry Pi. I highly recommend getting this offer now so that you can already learn a bunch of things in the next fortnight. I’m a fan of their services personally 🙂

Change the keyboard layout on Raspbian Desktop

Download the Pi Glossary!
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!

On Raspbian Desktop, you have a graphic tool to do this easily
It will be a short tutorial 🙂

  • Open the main menu
  • Go to Preferences > Raspberry Pi Configuration
  • Then go to the “Localisation” tab
  • And finally, click on “Set Keyboard”
  • From here you can select:
    • The keyboard model: Most of the time you can keep the default one
    • The layout: Basically it’s the keyboard country you are using
    • The variant: If you keyboard use a specific layout for this country, select it here (DVORAK for example)
  • Click “OK” to apply the changes

That’s it, your Raspberry Pi is now using your favorite keyboard layout

Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.

Thanks to all my Patrons for supporting me, helping me to keep doing this and producing even more tutorials for everyone! Thank you to everyone supporting me there.

Change the keyboard layout on Raspbian Lite

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

On Raspbian Lite, there is no graphic tool, but raspi-config will help you to do this 🙂

  • Start raspi-config
    sudo raspi-config
    If you’re having trouble entering this command, here’s what the default keyboard layout looks like:

    Click on the keys on your keyboard corresponding to this layout
  • Go to “Localisation Options”
  • Then select “Change Keyboard Layout”
  • The first step is to pick the keyboard model you are using

    Most of the time you can keep the default one
  • Now, you need to select the keyboard layout
    English layouts are available in the first window:

    If you need to use a layout for another country, click on “Other”
  • Here you can pick the country corresponding to your keyboard
  • And finally, choose the specific layout for this country
    If you don’t know, select the first one in the list
  • The last two or three questions are for the keyboard configuration
    The first one for the “Alt Gr” key:

    I always keep the default configuration personally
  • The next one for the compose key

    Same thing, only configure it if you need to use it
  • And finally the CTRL+ALT+BACKSPACE combination that you can configure too

That’s it, after a few seconds your keyboard is now correctly configured
Raspbian Lite will be much easier to use with the key at the right position 🙂

Conclusion

Master Python on Raspberry Pi
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.

Congrats! You now know how to change the default keyboard configuration on your Raspberry Pi
It’s often the first step after the installation, and even if this tutorial is relatively short, it is crucial to take a good start on Raspberry Pi

If you are just starting, you can also check my list of beginner tips on Raspberry Pi

And as usual, if you have any question, feel free to leave a comment below!


This tutorial doesn't work anymore? Report the issue here, so that I can update it!

0 0 votes
Article Rating

Patrick Fromaget

I'm the lead author and owner of RaspberryTips.com. My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Subscribe
Notify of
guest
4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Emthek
Emthek
1 year ago

I have RAK2245 PIHat OS which from all appearnces Raspbian 10 Buster. A couple of the keys don’t print the expected characters, specifically the backslash character ‘\’ which prints the hash character ‘#’. This is a major showstopper since postgresql command line utilizes the ‘\’ extensively. And it doesn’t print the pipe ‘|’ but a tilde ‘`’ character. This behavior has been replicated with three diffe and wirerent keyboards, Logitech wireless and wre and a wired Chromata gamer keyboard.
Logging in via SSH the keystroked print correctly.

Please advise.

David Herren
David Herren
1 year ago

This was, by far, the most complete treatment of keyboard maps for the Raspberry Pi that I have found to date. Thank you.

Someone, somewhere, must have figured out how to swap the command and control keys on a Raspberry Pi so that it matches an Apple keyboard layout. Using raspi-config, I have tried simply selecting every one of the “Apple” keyboard options, but none of them do what I am looking for. Simply, I would like to remap the cntrl key from it’s default location so that it is on the keys immediately adjacent to the space bar (the left of which currently calls the RPi menu), moving that functionality to the former location of the cntrl keys. To further complicate my needs, I NEED the international keyboard with dead keys functionality as well. (I switch between english and spanish multiple times a day).

Please don’t bash me as a Mac user. I came to the mac from NextStep/OpenStep and OpenBSD. I am very happy working in Pi-world (I have deployed 6 of them in my own home for various purposes). But switching back and forth from the 2 primary OSs that I use is a pain (I have the same pain when I have to work on a windows box).

Further, swapping these keys is user configurable option even on ChromeOS. It has simply got to be possible but I don’t know what options I would include in the /etc/default/keyboard file.

Thanks is advance for any tips.

Noel Kuck
Noel Kuck
Reply to  David Herren
1 year ago

Has anyone figured out the key(s) proper keyboard for the ‘\’ “forward slash” key to function properly?

Dominick M
Dominick M
Reply to  Noel Kuck
11 months ago

The character you typed is actually a backslash. Regardless, I got my keyboard configured correctly using the instructions in the article (using ‘sudo raspi-config’, which was already installed on Raspberry Pi OS Lite). My OS install was configured to use a bunch of UK stuff, not US, so I had to change as many default settings from UK to US as I could find. I also made sure I used a keyboard layout that didn’t include “(intl)”, so I used something like the Generic 101-key or Generic 104-key keyboards. I didn’t bother counting the keys on my keyboard, but whatever one I tried first worked for all of the special characters I needed. But, of course, your settings will depend on your keyboard and country.

Recent Posts

Master your Raspberry Pi - 10% off