I've seen a number of questions that point to a GUI menu to remap caps lock, but that menu seems to be gone in 14.04. Am I just not finding it, or is it really gone? I know you can use xkbmap to remap it, but I'm not really sure how to make that persist.


I've tried the suggestions on the accepted answer for this question, but nothing seems to be working. From what I can tell, the .xinitrc file doesn't ever seem to be sourced. Is there some other work around that might fix this for me?

  • possible duplicate of How do I remap certain keys?
    – jobin
    Apr 23, 2014 at 16:30
  • 2
    @Jobin if you'll notice I'm asking specifically about 14.04, not just in general. Apr 23, 2014 at 16:31
  • Have you tried the solution? I see that you have specific doubts as to whether it will persists reboots and that question address that concern.
    – jobin
    Apr 23, 2014 at 16:32
  • possible duplicate of How do I swap Escape and Caps Lock?
    – user68186
    Apr 24, 2014 at 21:19
  • 2
    It looks like Ubuntu 14.04 uses ~/.xsessionrc instead of ~/.xinitrc
    – user285662
    May 27, 2014 at 4:28

4 Answers 4


You should edit the file /etc/default/keyboard and modify the XKBOPTIONS setting.

For example to map capslock to control set XKBOPTIONS=“ctrl:nocaps” (source: Archlinux wiki

log out and log in again for changes to impact your system.

  • 4
    huge thanks mate, all this GUI nonsense with installing packages is a pain in the butt, and most ways either didn't work, or worked in some contexts but not others. Apr 23, 2015 at 4:45

Finally found a GUI answer, after much Googling: How do I swap Escape and Caps Lock in 14.04? (Looks like your question was phrased better and so showed up much higher in my search results.)

From the linked answer:

Install the GNOME Tweak Tool (gnome-tweak-tool), under the Typing tab there is an option to swap Esc with Caps Lock. This worked for me in Ubuntu 14.04.

Strangely, the tool window's background didn't fill in for me, so I had to open up a gedit window behind it just to view the text.

Hope that helps! Even with the buggy window, it was much more pleasant than messing with xkb settings directly.

  • This doesn't appear to work under XUbuntu 14.04.
    – Paul Price
    Aug 5, 2014 at 21:18
  • 1
    I got this to work in Ubuntu 14.04. The window background bug is really bad - hard to believe nobody has fixed that. If you want to swap CTRL and CAPS, that is done under "Ctrl Key Position", and is not available under "Caps Lock Behavior". I was puzzling over why every other option for the caps lock was listed except for swapping with CTRL when I finally noticed the separate setting for CTRL.
    – tim11g
    Feb 14, 2015 at 18:02
  • Unfortunately GNOME Tweak Tool seems quite bugged when used in Unity. The solution using /etc/default/keyboard seems more appropriate (I tried both).
    – marcelocra
    Mar 31, 2016 at 23:56
  • gnome-tweak-tool works well under Ubuntu 16.04. I like that changes are effective immediately with no restart or anything.
    – dinosaur
    Sep 26, 2016 at 23:28

In my case the following worked to disable capslock in Ubuntu 14.04:

setxkbmap -option caps:none

Startup Applications > Add > Name: Disable Capslock > Command: setxkbmap -option caps:none > Add.

Restart and capslock is disabled.

To remap capslock to escape key:

setxkbmap -option caps:escape
  • this is the simplest solution i could find and it works, setxkbmap -option caps:escape Dec 26, 2015 at 1:00

After searching around enough, I think I finally found that magic google incantation to find the answer. Here's the post that solved my problem: Make setxkbmap preferences being set at startup. I just followed the instructions in the accepted answer and added 'ctrl:nocaps' to the xkb-options. I really hope they just bring back the settings GUI to change this....

  • Unfortunaltely, now the capslock works as another CTRL-key. The capslock-key is not fully disabled. Sep 21, 2014 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .