Remap CapsLock to Control in Debian/Ubuntu

I like to remap my capslock key to control. In OSX there is a nice option built in, however different Linux distros and windows managers all seem to have different methods. I've used some settings in windows managers, but then the remap doesn't always work, particularly when connecting a new bluetooth keyboard.

This method will update the keyboard config in Debian/Linux:

sudo vi /etc/default/keyboard and add XKBOPTIONS="ctrl:nocaps", then run sudo dpkg-reconfigure keyboard-configuration