To use Caps Lock button as Ctrl in Debian, add this to /etc/default/keyboard:

XKBOPTIONS="ctrl:nocaps"

Caps Lock button will function as Ctrl both in X and console.