How do I switch the Ctrl and CapsLock keys on my keyboard?
Create a file called .xmodmaprc in the root of your home directory.
Copy the following lines into the file:
remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L
If you are using the bash shell, copy this line into your .bashrc file:
The settings will take effect the next time you log out and log back in.