In iTerm2, if I type /one/two/three/four/five and now if I want to delete five and write another string, then how do I delete the word five ?

If I use CTRL + W, it deletes the entire command all the way up to the beginning forward slash.

This exact same functionality is available on the out-of-the-box Terminal using option + BACKSPACE by using option key as meta key. I am running bash, but this terminal keyboard combination is not working on iTerm2.

  • Your answer should be posted as an answer below! Questions are for asking questions
    – grg
    Commented Feb 21, 2018 at 9:16
  • 2
    I can't replicate the problem. On a pretty "clean slate" macOS install, Ctrl-W in iTerm deletes the word. (Clean slate meaning other than iTerm, Firefox, and Chrome nothing else has been installed). Did you customize anything in iTerm?
    – Allan
    Commented Feb 21, 2018 at 11:33

1 Answer 1


I just found that in iTerm2, set options key as ESC+ key under profile -> keys.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .