hello I am completely new to linux,
can someone guide me to use setxkbmap to swap capslock with escape key so when I press esc it register capslock and when i press capslock pc register escape.
~/.xinitrc and ~/.xsession are files located in your home directory and executed at the beginning of your session. You can add a line to the .xinitrc file with the following command in a terminal: echo "setxkbmap -option caps:escape" >> ~/.xinitrc
You can also edit it with an editor such as nano, kate, etc.