Windows
Use PowerToys → Keyboard Manager
Linux
setxkbmap -option caps:escapeThis will only make the change temporarily. It can be added to ~/.profile to make permanent.
Another way is to use dconf-editor:
- select
org.gnome.desktop.input-sources - Change
xkb-optionsto['caps:escape']