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

Share this page:

5 Comment(s)

Add comment

Comments

From: at: 2008-06-10 08:25:43

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.

From: Rebuon at: 2010-11-10 17:28:03

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

From: Dincer Kavraal at: 2011-06-17 20:50:31

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

From: falcon7700 at: 2012-04-16 20:34:07

# sudo dpkg-reconfigure keyboard-configuration

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

From: Anonymous at: 2011-11-23 12:50:40

How about showing how to do it without some lame script wrapper?  Prove that you know what you are doing ;-)