This question already has an answer here:

Lubuntu 13.10. Keyboard model pc 105. I have 4 keyboard layouts - RU, PL, FR, UA. Is it possible to choose needed layout by command line in terminal? Command setxkbmap -layout fr not working for choosing French keyboard layout.

marked as duplicate by rɑːdʒɑ, user117103, Avinash Raj, Alvar, karel Dec 24 '13 at 5:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • It is another question. I want to select needed keyboard from 5-7 ones directly in terminal. Directly French (for) example. But there is another answer on link - how to change 1 keyboard from 2. My question is related, but it is exactly different question. – Ziutek Kirelejson Dec 23 '13 at 16:37

If you want to switch between keyboard mappings, you need to add a setxkbmap command to /etc/xdg/lxsession/Lubuntu/autostart

To switch between two keyboard mappings with the control+shift keys, Open the terminal and

echo '@setxkbmap -option grp:ctrl_shift_toggle "de,us"' | sudo tee -a /etc/xdg/lxsession/Lubuntu/autostart 

Keyboard mapping for 13.10 and beyond

Since Lubuntu 13.10, the method to choose and toggle keyboard layout has changed. Indeed, lxkeymap application is no longer installed by default, and we have to use Keyboard Layout Handler instead, a plugin for lxpanel.

On Lubuntu default installation, Keyboard Layout Handler appears on the right of the panel, near volume control. It displays a box which describes the current keyboard layout (for example, “US”). To modify keyboard layout settings, right click on it, and choose « Keyboard Layout Handler Settings ». Here you can make some modifications.

By default, the option « Keep system layouts » is checked. Uncheck it to customize your keyboard layout.

source: Lubuntu community/Keyboard


you can do it with two methods .




sudo apt-get install loadkeys

after installing loadkeys run it as normal user and choose the style you want with

loadkeys -v

PS: only works on CLI version.


This command you have to run as root user. as a normal user can not do the process with this command.

use it as

sudo setxkbmap -layout es

If you want to change it to English.

credit goes to : ubuntuforums


To change the keyboard layout (e.g. to French) in the Linux command line, enter the command:

loadkeys fr

The codes occur in various places like /etc/X11/xkb/.

  • Command loadkey fr also not works in my Lubuntu 13.10 (Keyboard model pc 105). This command don't give any effect. – Ziutek Kirelejson Dec 23 '13 at 10:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.