Been a long time since I used emacs (had to stop, it was hurting my pinky) but I did use M-x shell a lot, I always thought it ran bash but from this description I understand emacs has its own shell?!
M-x eshell is a shell implemented completely in Emacs Lisp and integrates with Emacs really nicely
setxkbmap -option ctrl:nocaps
xmodmap -e "keycode 107 = Control_R"
I would occasionally experience some pinky pain until I did this. Losing capslock is mostly inconsequential (you can always use upcase-region).https://www.masteringemacs.org/article/running-shells-in-ema...
(the whole site has lots of information about emacs)