How do I switch the Ctrl and CapsLock keys on my keyboard?
Create a file called .xmodmaprc in the root of your home directory.
vi ~/.xmodmaprcCopy 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_LIf you are using the bash shell, copy this line into your .bashrc file:
xmodmap .xmodmaprcThe settings will take effect the next time you log out and log back in.