Similar to macOS, the Caps Lock key on an Ubuntu Linux keyboard is a massive button situated right next to the home row. Unless you are typing database queries or yelling on the internet, you almost never need to lock your capitalization. Instead, it serves only as a massive tripwire for your pinky finger.
For power users, Vim enthusiasts, and programmers, this key is far too easily accessible to be wasted on a capitalization lock. Fortunately, the GNOME desktop environment built into modern Ubuntu includes a native, hidden tool specifically designed to intercept keyboard modifiers, allowing you to remap the Caps Lock key to a much more useful function, like Control or Escape.
How to Remap the Caps Lock Key in Ubuntu
You must use the GNOME Tweaks tool to alter keyboard modifier behaviors.
- First, ensure you have the necessary tool installed. Open the Terminal (Ctrl + Alt + T) and run:
sudo apt install gnome-tweaks - Once installed, open your application grid and launch the Tweaks app.
- In the left-hand navigation sidebar of the Tweaks window, click on Keyboard & Mouse.
- Look for the button labelled Additional Layout Options and click it.
- A new, detailed window will appear. Scroll down the list and expand the section titled Caps Lock behavior.
- You will be presented with a list of mapping options. To make it act like a Control key, select Make Caps Lock an additional Ctrl. To make it act like Escape, select Make Caps Lock an additional Esc.
- Alternatively, select Caps Lock is disabled if you simply want the key to do nothing when pressed.
The changes take effect immediately; no reboot is required. The physical indicator light on your keyboard will no longer activate, and your newly remapped key is ready for immediate use in your terminal or code editor.