Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
According to the cheat sheet of Emacs, M-w to copy a highlighted text and C-y to paste it. M-w means command w which ultimately tries to kill the terminal?
I figured out the problem.
My meta key was not mapped to the Option/alt Key in the terminal preference.
For Future Reference: To map the key:
Open Terminal App
Go to Preferences -> Profiles - Keyboard and use option as Meta Key.
Required, but never shown