Q. How do I deactivate caps lock key in Linux permanently?



A. You need to use the xmodmap command. It is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms. It is usually run from the userâ€™s session startup script to configure the keyboard according to personal tastes.

Adblock detected 😱 PayPal/Bitcoin, or become a supporter using Patreon. My website is made possible by displaying online advertisements to my visitors. I get it! Ads are annoying but they help keep this website running. It is hard to keep the site running and producing new content when so many people block ads. Please consider donating money to the nixCraft via, or become a

You can also use the setxkbmap command, which maps the keyboard to use the layout determined by the options specified on the command line.

xmodmap command to turn off caps key

To turn off caps lock key, enter:

$ xmodmap -e "remove lock = Caps_Lock"

Now caps key is disabled. To enable caps key, enter:

$ xmodmap -e "add lock = Caps_Lock"

Add following code to your shell startup file ~/.bash_profile or ~/.profile file:

$ echo 'xmodmap -e "remove lock = Caps_Lock"' >> ~/.bash_profile

setxkbmap command to turn off caps locks key

To turn off caps lock key, enter:

$ setxkbmap -option ctrl:nocaps

To reset caps lock. enter:

$ setxkbmap -option

Further readings: