Changing The Language & Keyboard Layout On Various Distributions

Want to support HowtoForge? Become a subscriber!
 
Submitted by o.meyer (Contact Author) (Forums) on Fri, 2008-05-09 14:42. :: Linux

Changing The Language & Keyboard Layout On Various Distributions

Version 1.0
Author: Oliver Meyer <o [dot] meyer [at] projektfarm [dot] de>
Last edited 04/03/2008

This document describes how to reconfigure the default language and the keyboard layout on various distributions so that they suit your location. I made this howto for our VMware images where the keyboard layout is always set to German and a few users have problems to configure the language and keyboard layout on these images.

This howto is a practical guide without any warranty - it doesn't cover the theoretical backgrounds. There are many ways to set up such a system - this is the way I chose.

 

1 Preliminary Note

If you're using a system with a desktop environment like Gnome or KDE you should use its tools to configure the default language and the keyboard layout. In the following steps I'll show you how to change the default language and the keyboard layout within the console on various distributions.

 

2 Fedora 8 Server / CentOS 5.x

2.1 Default Language

system-config-language

 

2.2 Keyboard Layout

system-config-keyboard

 

3 Debian Etch Server

3.1 Default Language

dpkg-reconfigure locales

 

3.2 Keyboard Layout

dpkg-reconfigure console-data

 

4 Ubuntu 7.10 Server

4.1 Default Language

sudo set-language-env -E

 

4.2 Keyboard Layout

sudo dpkg-reconfigure console-setup

 

5 Mandriva 2008 Server

5.1 Default Language

localedrake

 

5.2 Keyboard Layout

keyboarddrake

 

6 Suse 10.X Server

6.1 Default Language

yast2

Select "System" on the left side and then "Language" on the right side. Change the language and save the settings with "Accept"

 

6.2 Keyboard Layout

yast2

Select "Hardware" on the left side and then "Keyboard Layout" on the right side. Change the keyboard layout and save the settings with "Accept".

 

7 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Wed, 2011-11-23 13:50.
How about showing how to do it without some lame script wrapper?  Prove that you know what you are doing ;-)
Submitted by Dincer Kavraal (not registered) on Fri, 2011-06-17 21:50.

Unless  you have xserver using primitive terminal, you can have your keyboard layout installed by:

 # sudo dpkg-reconfigure keyboard-configuration

 (at least for ubuntu 11.04 natty)

 cheers

Submitted by falcon7700 (not registered) on Mon, 2012-04-16 21:34.

# sudo dpkg-reconfigure keyboard-configuration

This command also works well on Debian (6.0 squeeze) at the command line.

Submitted by Rebuon (not registered) on Wed, 2010-11-10 18:28.

In Puppy Linux's terminal it's with this command:

setxkbmap -layout us

The example is for the USA keyboard layout. For other layouts replace us with the corresponding code (for example es for Spain).

Taken from http://murga-linux.com/puppy/viewtopic.php?t=49614

Submitted by matsk (registered user) on Tue, 2008-06-10 09:25.

Here is instructions for localization of Gentoo: http://www.gentoo.org/doc/en/guide-localization.xml

General Linux:  http://howto.wikia.com/wiki/How_to_change_the_keyboard_layout_in_text_mode_on_a_linux-based_operating_system

But this howto can be coocked down to:

To change temporary (until reboot) loadkeys sv-latin To change temporarily to swedish keyboard layout.

And to verify that the keyboard layout is correct use the command: showkey

Permanent setting (RHEL, CentOS and Fedora):
Edit /etc/sysconfig/keyboard and replace KEYTABLE="us" by KEYTABLE="sv-latin1"
save and reboot.

To find whitch keyboard layout maps that is available is in the map /lib/kbd/keymaps/i386/... or /usr/share/keymaps/i386/..., depending on which distro is used.