This question already has an answer here:

I am using xmodmap to remap the capslock key to escape for my Linux system running X.

I am now working directly on a headless Ubuntu 14.04 LTS server that does not run X. Is there any easy way to get the same behavior in the system terminal as well, when directly logged in to the machine and typing on a USB keyboard?

marked as duplicate by Gilles linux Aug 17 '15 at 21:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Have you tried loadkeys? (It's in the kbd package in Debian) – Toby Speight Aug 17 '15 at 13:51