Skip to content

Instantly share code, notes, and snippets.

@basti1302
Last active December 11, 2015 05:18
Show Gist options
  • Save basti1302/4550888 to your computer and use it in GitHub Desktop.
Save basti1302/4550888 to your computer and use it in GitHub Desktop.
What you need to type to change the keyboard layout from "us" to "de" on CentOS, Fedora and similar Linux systems, when the actual keyboard has a German layout. There are quite a number of pages out there explaining what you need to *do*, but it's quite annoying to find the right keys to *type* while OS's keyboard layout does not match the actua…
# Lines beginning with # are not to be typed :-)
# Type this:
vi -etc-szsconfig-kezboard # vi /etc/sysconfig/keyboard
# The file probably looks like this:
KEYBOARDTYPE="pc"
KEYTABLE="us"
# Now type this:
jllllllllll # navigates to the value of KEYTABLE
# You might also be able to use the arrow keys to navigate.
# However, the cursor should be over the u of "us" now.
R # enter REPLACE mode
de # change the value to de for German keyboard layout
<ESC> # press Escape to leave REPLACE mode
Öwq # translates to :wq (save and exit vi)
reboot
A reboot seems to be neccessary for the change to take effect. At least
I found no other possibility.
If you need to type more stuff with KEYTABLE="us",
http://en.wikipedia.org/wiki/File:KB_United_States-NoAltGr.svg
might help.
While you're at it, you might also want to edit /home/USERNAME/.bash_profile
and add the line
export LANG=de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment