How to disable caps lock in Linux

The caps lock key is a vestige from older times. It is completely useless today and extremely irritating because it gets turned on by mistake while using programs like Vim. It is a good idea to turn it off completely by disabling it.

The setxkbmap program can be used to disable caps lock completely in all desktop environments and window managers by mapping it to the Ctrl key:

$ /usr/bin/setxkbmap -option '' -option 'ctrl:nocaps'

To apply this setting every time you login to any desktop environment, add the above line to your ~/.profile file. Log out and login to see the effect of this option.

Other methods to disable caps lock that I used to try earlier are given below:


  • In newer versions of Kubuntu: System Settings → Input Devices → Keyboard
  • In older versions of Kubuntu: System Settings → Hardware → Keyboard → Advanced.
  • Enable Configure keyboard options and under the tree of options choose Caps Lock is disabled.

Ubuntu 14.04

Install the GNOME Tweak Tool:

$ sudo apt-get install gnome-tweak-tool

Open it by typing Tweak Tool in the Dash. Choose Typing → Caps Lock key behavior. Confusingly, it is shown as Disabled. But this means that any customization on that is disabled. In the dropdown choose Caps Lock is disabled option and you are done!

Ubuntu 12.04

Open Keyboard Layout and click on the keyboard layout you are using, for example English (US). Click on Options → Caps Lock key behavior and choose Caps Lock is disabled.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.