The only time I use the caps lock button on my keyboard is when I accidentally press it and start typing in UPPERCASE. To disable it in Linux all you have to do is enter this on the command line:
$ xmodmap -e "remove lock = Caps_Lock"
To set this permanently, paste the above line in your
or if you are a vim user and you want to swap caps lock for your escape key
do the following
create the following file in your home directory
or if you don't want to swap the two keys around, instead you just want caps lock to behave the same as escape and escape key to still be the escape key.
Then put the following line in instead
The next time you log-in into an X session, the changes will take effect. Alternatively you can just run the command
and the changes will take effect immediately.