The right way to swap the left CTRL key and the CAPS LOCK key under Linux (Debian and probably others):
$ sudo cp /etc/console/boottime.kmap.gz /etc/console/boottime.kmap-DIST.gz
$ sudo vim /etc/console/boottime.kmap.gz
Swap Control and Caps_Lock on these lines:
keycode 29 = Control
keycode 58 = Caps_Lock
That should take care of the console. To fix X, edit /etc/X11/xorg.conf, and add this line to the keyboard InputDevice section:
Option "XkbOptions" "ctrl:swapcaps"
Restart X with:
$ sudo /etc/init.d/gdm restart
Failing the above, you can just issue the command:
setxkbmap -option ctrl:swapcaps
This can also be put in you .xsession file.