You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

If you've ever had the pleasure of using a 'Sun' keyboard, you'll note that the Caps Lock and Control keys are swapped. If you use your keyboard a lot, you probably use the Ctrl key a lot, and probably don't use the Caps Lock very often, if ever (UNLESS YOU'RE INTO YELLING). So, why force the awkward pinky reach down to the Ctrl?

This is in two parts, mostly because the Console terminals, the virtual terminals that don't have an X display, use a different keyboard mapping than the X window system.

If you want to swap the Caps Lock and left Ctrl keys,
find the left control entry, which should be:

Code:

keycode 29 = Control

Then replace it with Caps_Lock

Code:

keycode 29 = Caps_Lock

Human Compatability Note:
I did use the swapped mapping for a short while, but my wife was NOT happy with the resulting layout. She kept on struggling to remember the new location of 'Ctrl'.

--- End Option

Remember to re-zip the keymap when you are done.

Code:

gzip /etc/console/test.kmap

Finally, because you are tampering with your console keymap, do 'test' the test...

Code:

loadkeys test.kmap.gz

Make sure the keyboard does everything you expect that it should do. Only then should you copy the test.kmap.gz over the boottime.kmap.gz (technically, I should be telling the boot process to load an alternate keymap, instead of overwriting the default, this is easier).

----
Xorg:

Edit /etc/X11/xorg.conf

Code:

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc104" # Your model may be different here.
Option "XkbLayout" "us" # This is the only one I tested.
Option "XkbOptions" "ctrl:nocaps" # This is the new line.
EndSection

I found the valid XkbOptions lines in the "*.lst" files at /etc/X11/xkb/rules/
Another valid xkbOption is: