This is a simple utility to swap ctrl and caps lock on Ubuntu. It's tested on Ubuntu 20.
Run
./install.sh
To copy the script into /usr/local/bin. You can uninstall it deleting the file.
swapcaps
Run once to turn your caps to a ctrl. Re-run to revert it.