Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using System > Preferences > Keyboard > Layout > Options > Ctrl key position > Swap Ctrl and CapsLock, which works great for X.

How can I get the same for virtual consoles (Ctrl+Alt+F1, etc.)?

share|improve this question
up vote 1 down vote accepted
  1. Set your preferred keyboard options: System > Preferences > Keyboard > Layouts > Options
  2. Apply the layout and options system-wide: System > Preferences > Keyboard > Layouts > Apply System-Wide
  3. Reboot for the changes to take effect in the virtual consoles.

To double-check that the settings have been applied, look for XKBOPTIONS="ctrl:swapcaps" in /etc/default/console-setup. (Alternatively, if you know what you're doing you can go ahead and just edit this file directly.)

share|improve this answer
This does work, but I am looking for a way to affect only the virtual consoles instead of also all the accounts on the system when using X. (I only have a handful here, so I just reset them after this.) – Roger Pate Sep 20 '10 at 15:16
I see (since /etc/ is an hg repo using etckeeper) this modifies /etc/default/console-setup and /etc/console-setup/cached.kmap.gz. If I was to modify the former myself, what command generates the latter cached.kmap.gz? – Roger Pate Sep 20 '10 at 15:19
Actually, I put that in a separate question. – Roger Pate Sep 20 '10 at 19:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.