Equivalent key to alt+backspace on Linux

keyboard

In Linux and bash I use alt + bksp to remove the word before the cursor.

On mac the option / alt + delete does not work.

e.g If you typed aaaa bbbb you will get aaaa afterwards

Any suggestion?

Best Answer

this functionality is provide by "readline", http://unixhelp.ed.ac.uk/CGI/man-cgi?readline+3. Most of keys are same as Emacs,

  1. so, you can type control+w to delete the word just before the cursor
  2. or for example,you can change the preferences of the terminal.app, use option as Meta key. Meta+Delete do the same thing