I need to change the layout of the keyboard while working in the console on Linux. I need to set up English layout as the default for the console. How can I do it?
To change your keyboard layout fast, just install setxkbmap with:
sudo apt-get install x11-xkb-utils
After this you can always change the keyboard layout with:
To do this automatically every time, extend your
echo "setxkbmap us" >> ~/.bashrc
Now, open a new console and the US keyboard layout is activated. Don't worry if the small keyboard layout icon in the Ubuntu panel does not change.
The very funny could be to switch back... a possible solution is, to make a Bash script (named with symbols of the target language. For instance, англ).
The second trick is to type "setxkbmap us; setxkbmap ru", and then it's possible to use the Bash history to return the main layout to the console.